Reply
 
Thread Tools Display Modes
  #1   Report Post  
IT123456
 
Posts: n/a
Default mailmerge word.basic in Office 2003

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
  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

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
"IT123456" wrote in message
...
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



  #3   Report Post  
KZeeh
 
Posts: n/a
Default

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.

"IT123456" wrote:

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

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
After upgrade from office 2000 to office 2003 Graphic Appears as . Officeguy Microsoft Word Help 0 February 8th 05 02:55 AM
Is Office 2003 word documents compatible with office 97? 100green Microsoft Word Help 1 February 1st 05 09:33 PM
Microsoft Office Word 2003 Sharon Microsoft Word Help 1 January 16th 05 09:13 PM
How do I downgrade files from Office 2003 to Office 97 without in. Lou Microsoft Word Help 1 January 14th 05 04:34 AM
MS Office 2003 Word Document Icons dhprof Microsoft Word Help 1 November 30th 04 06:33 PM


All times are GMT +1. The time now is 02:11 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"