troubleshooting Question

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

Avatar of William Mimms
William Mimms asked on
OutlookVBAMicrosoft Word
3 Comments1 Solution129 ViewsLast Modified:
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

With EmailItem
    .Subject = "Quote Request"
    .To = ""
    .CC = ""
    .Importance = olImportanceNormal
    .Attachments.Add Doc.FullName
End With

Application.ScreenUpdating = True

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

End Sub
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros