編輯

共用方式為


UI2.ShowMailItem(String, String, String, String, String) Method

Definition

Creates an e-mail message in the default e-mail editor and attaches the currently open Microsoft Office InfoPath form to the message.

public:
 void ShowMailItem(System::String ^ bstrTo, System::String ^ bstrCC, System::String ^ bstrBCC, System::String ^ bstrSubject, System::String ^ bstrBody);
public void ShowMailItem (string bstrTo, string bstrCC, string bstrBCC, string bstrSubject, string bstrBody);
abstract member ShowMailItem : string * string * string * string * string -> unit
Public Sub ShowMailItem (bstrTo As String, bstrCC As String, bstrBCC As String, bstrSubject As String, bstrBody As String)

Parameters

bstrTo
String

The e-mail address to send the e-mail message to.

bstrCC
String

The e-mail address to copy the e-mail message to.

bstrBCC
String

The e-mail address to blind copy the e-mail message to.

bstrSubject
String

The subject of the e-mail message.

bstrBody
String

The body text of the e-mail message.

Implements

Examples

In the following example, the ShowMailItem method of the UIObject object is used to create a custom e-mail message:

thisXDocument.UI.ShowMailItem("someone@example.com", "", "", "Updated Form", "Here is the updated form that you requested.");

Remarks

After the e-mail message is created, the default e-mail editor will display the e-mail message; users can then inspect and edit the e-mail message before sending it. The ShowMailItem method will return an error if no e-mail editing program is available.

Note: The ShowMailItem method does not send the e-mail messages it creates; users must manually send the e-mail messages.

You can also use the MailEnvelopeObject object or EmailAdapterObject object to programmatically create e-mail messages.

Applies to