Macro to change default printer and then restore original default printer settin
Quote:
>> -----Original Message-----
>> That is quite simple to do and a great way of managing multiple
>> printers.
>> Dim sCurrentPrinter As String
>> sCurrentPrinter = ActivePrinter
>> ActivePrinter = "WinFax"
>> Application.PrintOut FileName:=""
>> ActivePrinter = sCurrentPrinter
>> Change "WinFax" to reflect the name of the printer you wish to print
>> to.
>> --
>> <>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
>> Graham Mayor - Word MVP
>> Web site www.gmayor.dsl.pipex.com
>> Word MVP web site www.mvps.org/word
>> <>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
>>> Is there a script to capture the current default printer,
>>> change the printer to another one & then restore the
>>> original default printer settings once the document has
>>> printed?
>> .
>> Brilliant. Thank you Graham. Now, can you tell me if
> it is possible to execute a macro on opening a document?
> ie: the user does not need to click a button, the macro
> just runs on opening?
> Thankyou.
Yes, but this means inserting a macro (AutoOpen) in the *document*. This has
the potential to conflict with macro security settings which are a user
selectable option, so it is entirely possible that the user can set the
protection so that the macro doesn't run. The toolbar button solution is
more practical.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP
Web site www.gmayor.dsl.pipex.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>