Avatar of William Mimms
William Mimms
 asked on

VBA in Word to send out body of Word doc in Outlook

I have created a document in Word with a "Submit" button that uses VBA to send the document via Outlook as an attachment.  My preference would be to send the information included in the Word document in the body of the email message vs. an attachment.

Cut and Paste from developer in Word:

Private Sub Submit_Click()
Dim OL          As Object
Dim EmailItem   As Object
Dim Doc         As Document

Application.ScreenUpdating = False
Set OL = CreateObject("Outlook.Application")
Set EmailItem = OL.CreateItem(olMailItem)
Set Doc = ActiveDocument
Doc.Save

With EmailItem
    .Subject = "Quote Request"
    .To = "wmimms@metalworkinggroup.com"
    .CC = "wnmimms@gmail.com"
    .Importance = olImportanceNormal
    .Attachments.Add Doc.FullName
    .Display
End With

Application.ScreenUpdating = True

Set Doc = Nothing
Set OL = Nothing
Set EmailItem = Nothing

End Sub

Open in new window

OutlookVBAMicrosoft Word

Avatar of undefined
Last Comment
Bill Prew

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Bill Prew

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
William Mimms

ASKER
Bill, Thanks so much!  Really appreciate the help!
Bill Prew

Welcome, glad that was useful.


»bp
Your help has saved me hundreds of hours of internet surfing.
fblack61