Nota:
El acceso a esta página requiere autorización. Puede intentar iniciar sesión o cambiar directorios.
El acceso a esta página requiere autorización. Puede intentar cambiar los directorios.
Obtiene un objeto MailItem que se puede usar para enviar el documento como correo electrónico. Solo lectura.
Sintaxis
expresión. Artículo
expresión necesaria. Variable que representa un objeto MsoEnvelope .
Ejemplo
En el ejemplo siguiente se envía el documento de Microsoft Word activo como correo electrónico a la dirección de correo electrónico que se pasa a la subrutina.
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
Vea también
Soporte técnico y comentarios
¿Tiene preguntas o comentarios sobre VBA para Office o esta documentación? Vea Soporte técnico y comentarios sobre VBA para Office para obtener ayuda sobre las formas en las que puede recibir soporte técnico y enviar comentarios.