Quote:
Frances, I am looking for the same thing, let me know if you have found out how to do this.
Thanks Doug
dpawloske@jsmcnamara.com
|
Hi Doug,
Here's the Outlook code that I used. You could just keep adding additional Attachments.Add lines for every attachment you'd like to put in the email.
The "^k" (equiv to Ctrl+k) is the keyboard shortcut to run the "Check Names" function, which identifies the recipients listed as being in the Global Address List. "Chr(13)" represents hitting Enter. RecipList, Subject1, Msg, Path2, ExpFile, and TsrFile are all variables I defined earlier in the macro.
Set olApp = New Outlook.Application
Set olNewMail = olApp.CreateItem(olMailItem)
With olNewMail
.Display
.Recipients.Add RecipList
Application.Wait (Now + TimeValue("0:00:01"))
SendKeys ("{TAB}")
SendKeys ("^k")
.Subject = Subject1
.Body = Msg & Chr(13) & Chr(13)
.Attachments.Add Path2 + ExpFile
.Attachments.Add Path2 + TsrFile
.Send
End With
Set olNewMail = Nothing
Set olApp = Nothing
Hope this helps!
Frances