?
Solved

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

Posted on 2009-02-08
7
Medium Priority
?
427 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
0
Comment
Question by:servent1
  • 3
  • 3
6 Comments
 
LVL 1

Accepted Solution

by:
SeanDoherty49 earned 2000 total points
ID: 23584155
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
0
 

Author Comment

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

0
 
LVL 1

Expert Comment

by:SeanDoherty49
ID: 23584300
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

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:servent1
ID: 23584397
Not familiar with VBA.  I'm opening word and using an Access db.
0
 
LVL 1

Expert Comment

by:SeanDoherty49
ID: 23588716
this is far more advanced than you are at present.

Good Luck
0
 

Author Comment

by:servent1
ID: 23595245
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!
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question