UI2.ShowMailItem method (String, String, String, String, String)

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

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
Sub ShowMailItem ( _
    bstrTo As String, _
    bstrCC As String, _
    bstrBCC As String, _
    bstrSubject As String, _
    bstrBody As String _
)
'Usage
Dim instance As UI2
Dim bstrTo As String
Dim bstrCC As String
Dim bstrBCC As String
Dim bstrSubject As String
Dim bstrBody As String

instance.ShowMailItem(bstrTo, bstrCC, _
    bstrBCC, bstrSubject, bstrBody)
void ShowMailItem(
    string bstrTo,
    string bstrCC,
    string bstrBCC,
    string bstrSubject,
    string bstrBody
)

Parameters

  • bstrTo
    Type: System.String

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

  • bstrCC
    Type: System.String

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

  • bstrBCC
    Type: System.String

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

  • bstrSubject
    Type: System.String

    The subject of the e-mail message.

  • bstrBody
    Type: System.String

    The body text of the e-mail message.

Implements

UI.ShowMailItem(String, String, String, String, String)

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.

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.");

See also

Reference

UI2 interface

UI2 members

ShowMailItem overload

Microsoft.Office.Interop.InfoPath namespace