Re: Recognize default printer name from within Word by Jezebel
Jezebel
Mon Mar 13 17:01:10 CST 2006
Use the same method --- make a note of the active printer, call the dialog,
reset the active printer.
"Legal Learning" <LegalLearning@discussions.microsoft.com> wrote in message
news:9DFE3224-9EA0-4FA0-B9BE-5AA2D45F939A@microsoft.com...
> Thanks Jezebel. However, I do not want to print it out. I want to show
> the
> print dialog window so that they can print more than one copy or current
> page. After the Print Dialog is displayed and they make their choices in
> copies or whatever and click ok is when I want it to go back to the
> printer.
> And, if I use ActivePrinter then it changes the default printer. I don't
> want to do that either.
> --
> CLG
>
>
> "Jezebel" wrote:
>
>> Dim pPrinter as string
>>
>> pPrinter = ActivePrinter
>>
>> ActivePrinter = "\\fs2\HP Color LaserJet 3500"
>> ActiveDocument.PrintOut
>>
>> ActivePrinter = pPrinter
>>
>>
>>
>>
>> "Legal Learning" <LegalLearning@discussions.microsoft.com> wrote in
>> message
>> news:0F8161CD-6FBD-4DEC-B69C-9AE3F3329CD2@microsoft.com...
>> > Here is my existing code:
>> > Sub Print_Letter
>> > With Dialogs(wdDialogFilePrintSetup)
>> > .Printer = "\\fs2\HP Color LaserJet 3500"
>> > .DoNotSetAsSysDefault = True
>> > .Execute
>> > End With
>> >
>> > Dialogs(wdDialogFilePrint).Show
>> > End Sub
>> >
>> >
>> > Let's say that the printer prior to running this macro is \\fs2\HP 4100
>> >
>> > After this macro is executed Word will keep the 3500 as the printer
>> > until
>> > the user changes it back. How can I assign a variable and change it
>> > back
>> > to
>> > the printer it was before executing the macro (this may not be the
>> > default
>> > either) AFTER the user clicks ok on the Print dialog?
>> >
>> > Thanks in advance for any help!
>> >
>> > --
>> > CLG
>>
>>
>>