Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Err 1004 means the printer you specified doesn't exist. Try a one line macro
debug.print application.activeprinter after you manually set your printer of choice to get the exact printer name. "Prabhu Dev" wrote in message ... Sub PrintFax() Dim Orginal_Printer As String Orginal_Printer = Application.ActivePrinter Application.ActivePrinter = "TOPCALL Fax" ActiveSheet.PageSetup.PrintArea = "$b$24:$i$74" With ActiveSheet.PageSetup .Orientation = xlPortrait End With ActiveWindow.SelectedSheets.PrintOut Copies:=1 Application.ActivePrinter = Orginal_Printer End Sub In the above procedure(macro) executing the following line Application.ActivePrinter = "TOPCALL Fax" generates the Run-time error '1004': Method 'ActivePrinter' of object '_Application' failed However printing the same region from the File menu and the Print command works perfectly well. The fax doc gets printed out on the fax machine. Any help will be appreciated. Prabhu |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Method Add of object Validation Failed - please help | New Users to Excel | |||
Method Add of object Validation Failed - please help | Excel Worksheet Functions | |||
Method 'MailEnvelope' of object '_Worksheet' failed | Excel Discussion (Misc queries) | |||
Method 'Add' of object 'CommandBarControls' failed | Excel Discussion (Misc queries) |