0

Users have a requirement to send word documents in the body of an email (not as an attachment), and to include a signature in all email correspondence.

Users are currently using Send to Mail Recipient, which inserts the document in the body of an email, however they are unable to automatically add their Signature and must manually add it with every email. From my understanding, this is because the mail piece embedded in Word is not the same as the full version of Outlook.

The regular E-Mail command in Word will bring up a new Email Message with their signature, however the document is an attachment instead of in the body of the email.

Is there a way to get Word to send it's content in the body of an email, and to automatically insert the user's signature?

I'm looking for a solution that will work on both Office 2007 and 2010, and Macro's are OK.

1 Answer 1

1

I found a Word macro to enable this functionality on HowTo-Outlook.com, in "Send Word Document As Email":

Sub SendDocAsMail()

Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem

On Error Resume Next

'Start Outlook if it isn't running
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
    Set oOutlookApp = CreateObject("Outlook.Application")
End If

'Create a new message
Set oItem = oOutlookApp.CreateItem(olMailItem)

'Allow the user to write a short intro and put it at the top of the body
Dim msgIntro As String
msgIntro = InputBox("Write a short intro to put above your default " & _
            "signature and current document." & vbCrLf & vbCrLf & _
            "Press Cancel to create the mail without intro and " & _
            "signature.", "Intro")

'Copy the open document
Selection.WholeStory
Selection.Copy
Selection.End = True

'Set the WordEditor
Dim objInsp As Outlook.Inspector
Dim wdEditor As Word.Document
Set objInsp = oItem.GetInspector
Set wdEditor = objInsp.WordEditor

'Write the intro if specified
Dim i As Integer
If msgIntro = IsNothing Then
    i = 1
    'Comment the next line to leave your default signature below the document
    wdEditor.Content.Delete
Else
    'Write the intro above the signature
    wdEditor.Characters(1).InsertBefore (msgIntro)
    i = wdEditor.Characters.Count
    wdEditor.Characters(i).InlineShapes.AddHorizontalLineStandard
    wdEditor.Characters(i + 1).InsertParagraph
    i = i + 2
End If

'Place the current document under the intro and signature
wdEditor.Characters(i).PasteAndFormat (wdFormatOriginalFormatting)

'Display the message
oItem.Display

'Clean up
Set oItem = Nothing
Set oOutlookApp = Nothing
Set objInsp = Nothing
Set wdEditor = Nothing

End Sub

If you need step-by-step help getting the macro into Word the actual (above) link has that, including pictures.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .