I see we have two threads on this topic
. Can you stick to one please.
If you set the macro in the document template as described earlier, the
document won't be printed to the wrong printer. The only way you can
establish whether you are printing to the correct printer is to intercept
the print routines and if you are going to do that, you might as well just
force the use of the correct printer. Your warning then becomes
superfluous.. The macro I posted earlier logs the current printer, changes
to the required printer (here an HP Laserjet), prints the document then
restores the original printer. It runs when you click the print button or
CTRL+P.
Sub FilePrintDefault()
Dim sCurrentPrinter As String
On Cancel GoTo Cancelled:
sCurrentPrinter = ActivePrinter
ActivePrinter = "HP Laser Jet 4050 Series PCL"
Application.PrintOut FileName:=""
Cancelled:
With Dialogs(wdDialogFilePrintSetup)
.Printer = sCurrentPrinter
.DoNotSetAsSysDefault = False
.Execute
End With
End Sub
To intercept the File > Print command you need a separate macro
Sub FilePrint()
Dim sCurrentPrinter As String
On Cancel GoTo Cancelled:
sCurrentPrinter = ActivePrinter
ActivePrinter = "HP Laser Jet 4050 Series PCL"
Dialogs(wdDialogFilePrint).Show
Cancelled:
With Dialogs(wdDialogFilePrintSetup)
.Printer = sCurrentPrinter
.DoNotSetAsSysDefault = False
.Execute
End With
End Sub
Note that these macros go in the document template - not normal.dot.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>