Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MailMerge from MS Word Destination = Printer

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
We're using code to generate a MailMerge through MS Word with some degree of success.
We can get things as far as creating the required DataSource (a data document) and performing a MailMerge with Destination of the printer.
What the code (below) does is gets as far as starting up MS Word and having the 'Print' prompt displayed to the user - which is OK as all we then need to do is click the 'Print' button.
Ideally we want this to be automated.
Our code so far :

wrdMailMerge.Destination = Word.WdMailMergeDestination.wdSendToPrinter;
WrdMailMerge.DataSource.FirstRecord = (int)Word.WdMailMergeDefaultRecord.wdDefaultFirstRecord;
wrdMailMerge.DataSource.LastRecord = (int)Word.WdMailMergeDefaultRecord.wdDefaultLastRecord;
wrdApp.Visible = true;
wrdMailMerge.Execute(ref oTrue);

As stated, this calls up MS Word and is ready to print (following confirming the clicking of the Print button).
Ideally we want to get over this last hurdle such that it is all automated.

Can anyone help us over that last bit ?

Thanks in advance
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top