LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calling the Windows Deafult Printer

How can I set the Windows Default Printer?

I am trying to set the printer back to the default printer after getting it
to print to a specific printer.

Does anyone know the specific code to do this?

I am calling this from Access but it is still basic code, here is hwat I
have tried:

'Print Invoice to PDF File
With xlSheet.PageSetup

xlSheet.Application.ActivePrinter = "CutePDF Writer on CPW2:"
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"CutePDF Writer on CPW2:", Collate:=True

With xlSheet.PageSetup
xlSheet.Application.ActivePrinter = "WindowsDefaultPrinter" = True
End With

The first bit works perfectly, captures the printer (PDF writer in this
case) and I need to be able to reset it back to the Windows Default Printer
as I I will not know what this printer is called.

xlSheet.Application.ActivePrinter = "***WindowsDefaultPrinter***" = True

The text between the stars gives errors not surprisingly, If this was
correct I think it would work.


Many thanks


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
calling printer Jase Excel Discussion (Misc queries) 0 October 13th 08 05:43 PM
Deafult Data Source Folder Dave Mc Excel Discussion (Misc queries) 1 April 21st 05 01:47 AM
How do I initiate the windows printer select object in Excel macro Mick B[_2_] Excel Programming 1 January 13th 05 09:46 PM
calling windows with variables Paul Excel Programming 3 August 2nd 04 04:49 AM
Calling .Net Windows services Roel Ang Excel Programming 0 May 14th 04 10:55 PM


All times are GMT +1. The time now is 01:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"