Edit

Share via


EmailAdapter.AttachmentFileName Property

Definition

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.

Applies to