Share via


View.ShowMailItem Method

Creates an e-mail message containing the current view.

Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)

Syntax

'Declaration
'Usage

Parameters

  • destinationTo
    The addresses for the To field of the e-mail message.
  • destinationCC
    The addresses for the CC field of the e-mail message.
  • destinationBcc
    The addresses for the BCC field of the e-mail message.
  • subject
    The Subject field of the e-mail message.
  • body
    The text for the body of the e-mail message.

Exceptions

Exception type Condition

ArgumentNullException

The parameters passed to this method are null.

ArgumentException

The parameters passed to this method arenot valid. For example, they are of the wrong type or format.

Remarks

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

This type or member can be accessed only from code running in forms opened in Microsoft Office InfoPath 2007.

Example

In the following example, the ShowMailItem method of the View class is used to create a mail message for the current view.

this.CurrentView,ShowMailItem("someone@example.com", null, null,
    "Sample InfoPath Form", "This is a sample InfoPath form.");
Me.CurrentView,ShowMailItem("someone@example.com", String.Empty, _
   String.Empty, "Sample InfoPath Form", 
   "This is a sample InfoPath form.");

See Also

Reference

View Class
View Members
Microsoft.Office.InfoPath Namespace