Pleasseee help!!!

mikechambers

Active Member
Joined
Apr 27, 2006
Messages
397
My master code is in Excel. But part of my code opens up Word and does some things. I have used email automation within Excel, and am trying to utilize the same principles in the Word section, but it's not working. I am using Word 2003.

Dim olApp As Outlook.Application
Dim olMail As Outlook.MailItem
Set olApp = CreateObject("Outlook.Application")
Set olMail = olApp.CreateItem(0)
olMail.BCC = "name@yahoo.com
olMail.Subject = "This is the subject"
olMail.Body = "This is the body"
olMail.Send
Set olApp = Nothing
Set olMail = Nothing

The part that says "This is the body" is where I want the body to be the actual Word document. So I don't want to send the document as an attachment, but rather IN the body of the email. Just as it would do if I chose File, Send To, Mail Recipient from the menus. How can I grab the document contents and put it into the body of the email?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,214,875
Messages
6,122,037
Members
449,062
Latest member
mike575

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