![]() |
|
#1
|
|||
|
|||
![]() Code:
Sub eMailActiveDocument() Dim OL As Object Dim EmailItem As Object Dim oEditor 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" .BodyFormat = olFormatRichText Set oEditor = .GetInspector.WordEditor oEditor.Content.Paste .To = "gmaxey@gregmaxey.com" .Importance = olImportanceNormal 'Or olImprotanceHigh Or olImprotanceLow .Display 'Send End With Application.ScreenUpdating = True Set Doc = Nothing Set OL = Nothing Set EmailItem = Nothing End Sub If you want to use "Send" instead "Display" you are probably going to have to insert a delay before killing the Outlook instance. |
#2
|
|||
|
|||
![]()
Hello Greg
Thank you for posting this, it worked perfectly! |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
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 |
![]() |
bigbird69 | Word VBA | 13 | 11-18-2012 10:06 PM |
![]() |
gauntlett | Word | 1 | 04-27-2012 09:06 AM |