Propriedade MsoEnvelope.Item (Office)

Obtém um objeto MailItem que pode ser usado para enviar o documento como um email. Somente leitura.

Sintaxe

expressão. Item

expressão Obrigatório. Uma variável que representa um objeto MsoEnvelope .

Exemplo

O exemplo a seguir envia o documento ativo do Microsoft Word como um email para o endereço de email que você passa para a sub-rotina.

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 email message. 
 .Introduction = "Please read this and send me your comments." 
 
 'Return a 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 will 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

Confira também

Suporte e comentários

Tem dúvidas ou quer enviar comentários sobre o VBA para Office ou sobre esta documentação? Confira Suporte e comentários sobre o VBA para Office a fim de obter orientação sobre as maneiras pelas quais você pode receber suporte e fornecer comentários.