Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Error when directly printing mailmerge document
Hello, I'm using code to directly print a executed mailmerge document. It
works fine on my machine but one user receives the following error "You cannot send a catalog created by merging documents directly to mail, fax, or a printer". Also, when I use code to preview the merge document it's called FormLetter on my machine, but on the other user's machine it's called Catolog1. Anyone know why this happens? I've included by code below. Thanks Set objApp = CreateObject("Word.application") strTextFile = sSalesDirectory & "\tmpContract.txt" With objApp .Visible = True .Documents.Open strDocName strDocNameB = objApp.ActiveDocument.Name .ActiveDocument.MailMerge.OpenDataSource strTextFile .ActiveDocument.MailMerge.Destination = 1 'wdSendtoprinter .ActiveDocument.MailMerge.Execute .Documents(strDocNameB).Close 0 .Quit 0 End With |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Error when directly printing mailmerge document
best guess:
- you are opening a document whose name is stored in strDocName - on one machine, this document is already set up as a mailmerge catalog/directory type document; on the other machine, it's set up as a Fomr Letters type merge document (the default merge type document) or a "Normal Word Document". - Using OpenDataSource wil not change an existing merge document type unless it's "Normal Word Document", in which case the type will become, by defualt, "Form Letters" - when you merge to a new document, the name of the output document depends on the merge type. Peetr Jamieson "Don" wrote in message ... Hello, I'm using code to directly print a executed mailmerge document. It works fine on my machine but one user receives the following error "You cannot send a catalog created by merging documents directly to mail, fax, or a printer". Also, when I use code to preview the merge document it's called FormLetter on my machine, but on the other user's machine it's called Catolog1. Anyone know why this happens? I've included by code below. Thanks Set objApp = CreateObject("Word.application") strTextFile = sSalesDirectory & "\tmpContract.txt" With objApp .Visible = True .Documents.Open strDocName strDocNameB = objApp.ActiveDocument.Name .ActiveDocument.MailMerge.OpenDataSource strTextFile .ActiveDocument.MailMerge.Destination = 1 'wdSendtoprinter .ActiveDocument.MailMerge.Execute .Documents(strDocNameB).Close 0 .Quit 0 End With |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Printing objects in a Word document | Microsoft Word Help | |||
Printing a master document | Formatting Long Documents | |||
Protect mailmerge document | Mailmerge | |||
How to mailmerge formatted text from a Exel to Word document? | Mailmerge | |||
Word 2000 printing landscape pages - orientation in final document | Microsoft Word Help |