mailmerge word.basic in Office 2003

I

IT123456

using word.basics in previous version of word, the below work

msword := createoleobject('word.basic');
try
MSWord.chdir(dirname);
MSWord.FileOpen(dirname+lettername );
msword.mailmergetodoc;
msword.fileprintsetup(Printer.Printers[Printer.PrinterIndex]);
MsWord.Fileprint(NumCopies:=Copies);
MsWord.FileCloseAll(2);


I now get

The Mailmergedocto command is not available because the document is not a
mail merge main document
 
D

Doug Robbins

I suggest that you look up the mailmerge item in the VBA help file. You
will find examples there of how to do it using Visual Basic

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
K

KZeeh

Did you find a solution to this? I was told to instantiate Word.Application
instead of word.basic, but I am unsure of the commands. Please let me know
if you found a way to make this work. Thank you.
 

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