Partager via


Propriété MsoEnvelope.Introduction (Office)

Définit ou obtient le texte d’introduction inclus dans un document envoyé à l’aide de l’objet MsoEnvelope . Le texte d’introduction est inclus en haut du document dans l’e-mail. Lecture-écriture.

Syntaxe

expression. Introduction

expression Variable qui représente un objet MsoEnvelope .

Exemple

L’exemple suivant envoie le document Microsoft Word actif sous forme d’e-mail à l’adresse e-mail que vous passez à la sous-routine.

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. 
 .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

Voir aussi

Assistance et commentaires

Avez-vous des questions ou des commentaires sur Office VBA ou sur cette documentation ? Consultez la rubrique concernant l’assistance pour Office VBA et l’envoi de commentaires afin d’obtenir des instructions pour recevoir une assistance et envoyer vos commentaires.