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
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