mailmerge word 2003

K

Kevin Payne

I have an application (vfp) with a lot of letters being produced in Word
using mail merge. The application works great for all versions of Word
97-2002 without Word being visible or any action by the user.

Tried to run the same routine on Word 2003 and it brings up a prompt dialog
wanting to know the name of the merged file. Once they name the file it runs
fine.

Anyone know why this prompt is occurring in word 2003?

Thanks,
Kevin
 
D

Doug Robbins

Not sure what you mean by the "merged file". Is it the mailmerge main file
or a file created by the mailmerge?

Also, without seeing some code, it's hard to offer any suggestions. I am
surprised however that the problem only occurs with 2003 and not also with
2002.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
K

Kevin Payne

Hi Doug,

Thanks for responding. It's pretty straight forward code. I create a
delimited text file that gets attached to the doc. This runs great in all
versions of word except 2003. In 2003 it is prompting a "save as" dialogue
box in the document image viewer? This is what I am being told, I am one of
two developers on this project, and the other developer did the testing on
site where they have a couple of versions of 2003. I have every version but
that one, so I haven't actually been able to reproduce the problem.

oWorddoc = Createobject("word.application") && Create word object
oWorddoc.documents.open(cfileName)

oWorddoc.Activedocument.MailMerge.OpenDataSource(m.lcSourceDoc)
oWorddoc.Activedocument.MailMerge.Destination = wdSendToPrinter
oWorddoc.Activedocument.MailMerge.Execute

oWorddoc.documents.close(0)
oWorddoc.application.quit
release oWorddoc
 
D

Doug Robbins

Instead of

oWorddoc.documents.close(0)

try

oWorddoc.documents.close wdDoNotSaveChanges

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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