EmailAdapter.AttachmentFileName Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the file name to be used for the current form when the form is attached to the e-mail message of an EmailAdapterObject object.
public:
property System::String ^ AttachmentFileName { System::String ^ get(); void set(System::String ^ value); };
public string AttachmentFileName { get; set; }
member this.AttachmentFileName : string with get, set
Public Property AttachmentFileName As String
Property Value
Examples
This example shows how to use the AttachmentFileName property of an instance of the EmailAdapterObject object to change the name of the form when it is attached to the e-mail message before the EmailAdapterObject object is submitted. This example requires myEmailAdapter
to reference an e-mail message Data Connection established in the design mode window of InfoPath, and two variables, strName
and strDate
, which set the name of the file attachment:
myEmailAdapter.<span class="label">AttachmentFileName</span> = strName + "–" + strDate + ".xml";
Remarks
The ".xml" file name extension will be appended to the string if it is not already included.
If the AttachmentFileName property is set to a null reference (Nothing in Visual Basic), the form will not be attached to the e-mail message.