Table of contents
TOC
Collapse the table of content
Expand the table of content

MsoEnvelope Object (Office)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Provides access to functionality that lets you send documents as e-mail messages directly from Microsoft Office applications.

Remarks

Use the MailEnvelope property of the Document object, Chart object or Worksheet object (depending on the application you are using) to return a MsoEnvelope object.

Example

The following example sends the active Microsoft Word document as an e-mail message to the e-mail address that you pass to the subroutine.

Sub SendMail(ByVal strRecipient As String) 

 'Use a With...End With block to reference the MsoEnvelope object. 
 With Application.ActiveDocument.MailEnvelope 

 'Add some introductory text before the body of the e-mail. 
 .Introduction = "Please read this and send me your comments." 

 'Return a Microsoft Outlook MailItem object that 
 'you can use to send the document. 
 With .Item 

 'All of the mail item settings are saved with the document. 
 'When you add a recipient to the Recipients collection 
 'or change other properties, these settings persist. 
 .Recipients.Add strRecipient 
 .Subject = "Here is the document." 

 'The body of this message will be 
 'the content of the active document. 
 .Send 
 End With 
 End With 
End Sub

Events

Name
EnvelopeHide
EnvelopeShow

Properties

Name
CommandBars
Introduction
Item
Parent

See also

Other resources

Object Model Reference

© 2017 Microsoft