Send Word document as email body

I already explained how to send emails automatically, but didn’t really focus on the content of the email. That is probably biggest problem of this method followers. In this article I’m going to show You how to cope with such issue and send Word document as email body.

The easiest way to have the content formatted properly is to copy text from Word and paste that to the created email. You cannot pass the content as string variable, because You will loose all the formatting.

Also there are other possibilities like adding HTML tags into the content, but this solution is good, when You have only 1 text. Not changeable, static, You know. And if it’s really long it would take a lot of time for tagging…

Anyway, back to the main topic, Word content to email body!

First of all, You need to copy the Word file content into the clipboard. To do that You need to create Word object and set the document – the equivalent of an Excel worksheet.

Set wd = CreateObject("Word.Application")
Set doc = wd.documents.Open("Word file path")

Then You can copy the content of the document and store it in clipboard.


Now comes the standard part of sending the email with a small modification. Instead of .Body You need to go to the WordEditor in your e-message.

Set editor = .GetInspector.WordEditor

After that just paste the text stored in clipboard by pasting that into the content of the editor object.


To this moment everything is easy and clear.

There goes the tricky part

Unfortunately using .Send method the content of the email body is empty. It appears that copy-pasting method is working only for .Display email method.

But nobody said that You can’t combine those 2 methods together.


It is causing a small flicker – just before sending, the email is popping up for a split second, but this is the only way to make it work.


Option Explicit

Sub WordDocAsBody()

 Dim OutApp As Object, OutMail As Object
 Dim wd As Object, doc As Object, editor As Object

 Set wd = CreateObject("Word.Application")
 Set doc = wd.documents.Open("Word file path")

 Set OutApp = CreateObject("Outlook.Application")
 Set OutMail = OutApp.CreateItem(0)

 With OutMail
     .To = "email address"
     .Subject = "subject"
     Set editor = .GetInspector.WordEditor
 End With

 doc.Close 0
 Set OutMail = Nothing
 Set wd = Nothing
 Set OutApp = Nothing

 MsgBox "Done"

End Sub

That was the easiest way to have formatted text in the email body, the same way as in Word document. Although this has a small flicker, but I think we can consider this as the fastest and most comfortable way to send complex message using Outlook.

Author: Tomasz Płociński

I'm very advanced in VBA, Excel, also easily linking VBA with other Office applications (e.g. PowerPoint) and external applications (e.g. SAP). I take part also in RPA processes (WebQuery, DataCache, IBM Access Client Solutions) where I can also use my SQL basic skillset. I'm trying now to widen my knowledge into TypeScript/JavaScript direction.

3 thoughts on “Send Word document as email body”

  1. On ‘Set editor = .GetInspector.WordEditor’ I get “Run-time error ‘287’: Application-defined or object-defined error”.

    I have Office, Word, Excel and Outlook 16.0 Object Library references selected.

    Any suggestions?

    1. Is Word the default email editor?

      From the Inspector.WordEditor doc:
      The WordEditor property is only valid if the IsWordMail method returns True and the EditorType property is olEditorWord . The returned WordDocument object provides access to most of the Word object model…

Leave a Reply

Your email address will not be published. Required fields are marked *