Add OLE Object to Message in Outlook

comebakqueen

New Member
Joined
Jan 20, 2014
Messages
8
Hey Guys!


I 've recently created this awesome serious of Macro's to automate the distribution of a monthly report but am getting stuck on the last code which happens to be in Outlook (where you can’t record Macro’s)!


I’ve set up the code to create a draft for the supplier, insert the e-mails and attachments but I can’t figure out how to add an OLE Object (from a file) in to make up the body!


The code is here:


Sub DIFOT_Mailout()
Dim myOutlook As Outlook.Application
Dim objMailMessage As Outlook.MailItem
Set myOutlook = Outlook.Application
Set objMailMessage = myOutlook.CreateItem(0)
With objMailMessage
.To = "Person1; Person2"
.CC = "Team1; Team2"
.Subject = "Bidvest DIFOT Results for January 2014"
.Body = ""
.Attachments.Add ("R:\Operations\Australia\Reports\DIFOT\Supplier Reports\Document1")
.Attachments.Add ("R:\Operations\Australia\Reports\DIFOT\Supplier Reports\Document2")


.Display

.Save
.Close olPromptForSave
End With


End Sub



Can anyone help out?


Cheers,
Tams =D
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,225,665
Messages
6,186,312
Members
453,349
Latest member
neam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top