perform merge on open

J

jeanne

I have a hyperlink pointing to a merge document. I'd like
the merge to occur automatically when the the document is
opened, that is, when the link is clicked. Can this be
done.
 
B

Bobby Mikkelson_MSFT

Hello Jeanne,

This is possible to start the merge and possibly run through the wizard but
this can only be done using a VB or VBA Macro. Unfortunantly I can't help
create the macro. A Programmer familliar with VB and VBA should be able to
write one faitly easily.

Hope this helps

Thanks

Bobby Mikkelson

--------------------
| Content-Class: urn:content-classes:message
| From: "jeanne" <[email protected]>
| Sender: "jeanne" <[email protected]>
| Subject: perform merge on open
| Date: Tue, 20 Jan 2004 13:09:02 -0800
| Lines: 4
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcPfmaD7MISzpBokTjmPvYxWEKhlBw==
| Newsgroups: microsoft.public.word.mailmerge.fields
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.word.mailmerge.fields:34835
| NNTP-Posting-Host: tk2msftngxa13.phx.gbl 10.40.1.165
| X-Tomcat-NG: microsoft.public.word.mailmerge.fields
|
| I have a hyperlink pointing to a merge document. I'd like
| the merge to occur automatically when the the document is
| opened, that is, when the link is clicked. Can this be
| done.
|
 
P

Peter Jamieson

When the user clicks the link, is the Word document going to be opened in
Word inside an Internet Explorer window, or Word on its own? If the former,
I think you will have difficulty getting a a merge to run. If the latter,
the second question is "Where is the data source?" If it is at a URL (which
is what people typically want in this situation), Word cannot connect to the
source. It has to connect either to a file with a "WIndows file system
address", such as abc.doc, c:\def\abc.doc, \\myserver\myshare\abc.doc etc.,
or to a client-server type database such as SQL Server or Oracle, via ODBC
or (Word 2002 and later) OLEDB.

If the document will open in Word only and is able to connect to the data
source, all you really need is an AutoOpen macro that does

ActiveDocument.MailMerge.Execute

but you might also want to do stuff such as specify the data source. If the
data source needs to be specified at runtime you should save the mail merge
main document without a data source and connect using OpenDataSource in your
macro.
 
J

jeanne

Yes, it will open in Word only and yes, it can find the
data source (and .mdb file). I think adding the macro will
do it for me. Thanks!

-----Original Message-----
When the user clicks the link, is the Word document going to be opened in
Word inside an Internet Explorer window, or Word on its own? If the former,
I think you will have difficulty getting a a merge to run. If the latter,
the second question is "Where is the data source?" If it is at a URL (which
is what people typically want in this situation), Word cannot connect to the
source. It has to connect either to a file with a "WIndows file system
address", such as abc.doc, c:\def\abc.doc,
\\myserver\myshare\abc.doc etc.,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top