![]() |
#1
|
|||
|
|||
![]()
Hi
I want to attach all PDFs in a specific desktop folder to an Outlook email using VBA in Word I'm using below code to generate an Outlook email but cant figure out how to write the attachment part. Sub Email_Template1() Dim oMailItem As Object, oOLapp As Object Dim Word As Object, doc As Object, MsgTxt$ Set oOLapp = CreateObject("Outlook.Application") Set oMailItem = oOLapp.CreateItem(0) Set Word = CreateObject("word.application") With oMailItem .To = "Email" .cc = "Email" .subject = "Needed Confirmation" ' .attachment.Add .HTMLBody = "test" .Display End With Set oOLapp = Nothing Set oMailItem = Nothing End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
eduzs | Word VBA | 3 | 09-02-2018 04:26 AM |
help with deleting email folder in Outlook | marty364 | Outlook | 0 | 01-09-2016 11:15 PM |
Attaching a folder | alamorchgirl | Misc | 0 | 06-16-2011 06:32 PM |
![]() |
salin | Outlook | 4 | 04-25-2011 10:29 AM |
![]() |
blueskyflowers | Outlook | 1 | 10-06-2010 01:37 PM |