We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

How to email a mail merged word doc and mail merge the subject and the body of the email

Medium Priority
438 Views
Last Modified: 2013-12-02
I'm mail merging a word doc with MS Access.  Then when I hit the "finish and send" button
I choose "send email messages."  Now I choose "attachment" and I can type in
the subject and hit OK.

Now this works but the body of the email is blank.  What if I want to
do this but mail merge the subject line and mail merge the body of
the email message to make it more personal?

Dean
Comment
Watch Question

The following code should work for you.

I found it ages ago on the net so I cannot claim the rights to it but it certainly works

Dim EmObj As Outlook.MailItem
Dim MSObjOutlook As Outlook.Application

Set MSObjOutlook = New Outlook.Application
Set EmObj = MSObjOutlook.CreateItem(olMailItem)

EmObj.To = Email address:
EmObj.Subject = Subject
EmObj.Body = ActiveDocument.Content
EmObj.ReadReceiptRequested = True:
EmObj.send

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Thanks for the Reply.  Wow, what is that code?  Where does it go?
Can you give more details please?

It is VBA.
Have you not used it before.

Are you sending email form Word using an Access database or opening Word from Access and emailing that way?

I use Access and open Word and Outlook from Access, maybe not what you are looking for
Cheers

Author

Commented:
Not familiar with VBA.  I'm opening word and using an Access db.
this is far more advanced than you are at present.

Good Luck

Author

Commented:
I do have a BS in computer science about 25 years ago.  I always wanted
to learn VBS but just don't have the time when trying to run my business.
I found a program called at 4tops.com and works fairly well but
cost $300.  Like to try to avoid paying that if I have to.
Anyway, thanks for your time!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.