Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-16-2024, 02:43 PM
guyver4 guyver4 is offline vba Send Word document as email, not attachment Windows 11 vba Send Word document as email, not attachment Office 2016
Novice
vba Send Word document as email, not attachment
 
Join Date: May 2024
Posts: 2
guyver4 is on a distinguished road
Default vba Send Word document as email, not attachment

Hello everyone. I am wondering if I can get some help with this code I am using below.

While it currently sends the complete document text to Outlook as a Doc attachement,


I would like it to actually send the document contents to the body of the email.


Thanks.

Sub eMailActiveDocument()

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
Doc.Content.Copy

With EmailItem
.Subject = "Insert Subject Here"
.Body = "Insert message here" & vbCrLf & _
"Line 2" & vbCrLf & _
"Line 3"
.To = "User@Domain.Com"
.Importance = olImportanceNormal 'Or olImprotanceHigh Or olImprotanceLow
.Attachments.Add Doc.FullName
.Send
End With

Application.ScreenUpdating = True

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

End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a VBA Code to print then send as an email attachment bcfd_110 Word VBA 1 09-04-2022 01:53 PM
Help to get a word document to send specific content via email using submit button ActualJax Word VBA 2 07-06-2020 04:18 PM
Outlook macro to check a value of a cell in an attachment and send an email based on that value ketangarg86 Outlook 13 03-25-2015 07:11 AM
vba Send Word document as email, not attachment Command button - save in temp folder and send email with attachment bigbird69 Word VBA 13 11-18-2012 10:06 PM
vba Send Word document as email, not attachment sending word document as email attachment causes format loss gauntlett Word 1 04-27-2012 09:06 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:00 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft