macro to merge to new document doesn't work

G

Ginny

I am trying to run a mail merge from Visual Foxpro using Office 2003.
I wrote code years ago to do this using Office 2000 and it has always
worked just fine. I recorded a macro in Word that opens the merge
source document and then 'merges to new document'. I run it using a
'Run' command out of VFP. Now with Office 2003 and now 2007, I need
to update their macro.

I try to 'record the macro' in Word 2003 and it looks like it's
working fine, however when I run it, it does not go to the step that
'merges to new document'. It stops at the mail merge source document
and goes no further.

When I run the macro, it asks me to verify that I want to select the
contents of a certain file. When I say 'Yes', the merge source
document comes up but it doesn't perform the 'merge to new document'.
I can't seem to get that part to happen even though the macro has it
in there. I don't know if it has anything to do with the 'safety'
question about 'are you sure....' or not.

Any ideas?
 
P

Peter Jamieson

1. You probably need to apply the registry patch described in the following
article

http://support.microsoft.com/kb/825765

2. For VFP, if your code is not explicitly connecting via ODBC, Word may be
trying to connect using OLE DB. My guess is that you already have the
necessary ODBC driver/OLE DB provider as there is usually a warning message
telling you to get the relevant stuff from the MS Web Site, but FWIW here my
VFP ODBC driver is version 6.01.8629.01 (look in the ODBC administrator)
and my VFP OLE DB provider dll is version 9.0.0.2412 (look for vfpoledb.dll,
probably in C:\Program Files\Common Files\System\Ole DB)

Peter Jamieson
 

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