Solved

Start a Mail merge of Access 2000

Posted on 2001-06-05
7
191 Views
Last Modified: 2006-11-17
I would like to have an Access 2000 form
pass the data from a access query/table
to Ms Word 2000 where it would start a Mail Merge
for me. This to be automated so that a user
can just click on the Access form "Print Certificates"
and it will pass the table data or table reference, start the mail merge and go to the printer.
HOW ?
Thanks !!!
0
Comment
Question by:Whux
7 Comments
 
LVL 4

Accepted Solution

by:
nmilmine earned 75 total points
Comment Utility
Hi Whux

This is some code I have used.  Paste it into a new module.  You can only use a table and not a query so will need to use the make table query to create a temp table if you need filtered results

Substitute Jewelz document and Renshaws database for your own

Function MergeItJewelz()
   
   Dim objWord As Word.Document
   Set objWord = GetObject("C:\Program Files\Database\Jewelz Merge.doc", "Word.Document")
   ' Make Word visible.
   objWord.Application.Visible = True
   ' Set the mail merge data source as database.
   objWord.MailMerge.OpenDataSource _
      Name:="C:\Program Files\Database\Renshaws GemTime.mdb", _
      LinkToSource:=True, _
      Connection:="TABLE JewelzClients", _
      SQLStatement:="SELECT * FROM [JewelzClients]"
   ' Execute the mail merge.
   objWord.MailMerge.Execute

End Function

HTH
Neil

0
 

Author Comment

by:Whux
Comment Utility
Works !!!
Thanks !!
The only problem at this point is that
my macro in the Word doc
steps through it all and ends before the print
is done thius giving me a warning msg that the print
job is not done . Do you know how to get around that ?
0
 

Author Comment

by:Whux
Comment Utility
old
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
Hi Whux@idg,
You've requested to delete this question, but its status has remained as 'Pending Delete' because one or more comments have been added.  Normally, the only way to fully delete such a Question is to post a message to Community Support and ask for assistance.

EE is making a one-time database sweep to purge the Pending Delete Questions automatically.  During this sweep:

    Whux@idg -- To allow the deletion to proceed:  Do nothing.
    EXPERTS -- Please DON'T POST a comment except to contest this deletion.

In the future, please refer to http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp#8 for instruction on deleting questions.

DanRollins -- EE database cleanup volunteer
0
 
LVL 4

Expert Comment

by:nmilmine
Comment Utility
I thought I had given the required answer given Whux's comments

Neil
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
You definitely did respond correctly to the initial request, sorry you had to wait so long.  Finalized.
Moondancer - EE Moderator
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now