Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
calling printer | Excel Discussion (Misc queries) | |||
Deafult Data Source Folder | Excel Discussion (Misc queries) | |||
How do I initiate the windows printer select object in Excel macro | Excel Programming | |||
calling windows with variables | Excel Programming | |||
Calling .Net Windows services | Excel Programming |