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: 34
Default Method 'ActivePrinter' of object '_Application' failed

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
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
Method Add of object Validation Failed - please help Shokie New Users to Excel 1 July 10th 09 01:34 PM
Method Add of object Validation Failed - please help Shokie Excel Worksheet Functions 1 July 10th 09 01:33 PM
Method 'MailEnvelope' of object '_Worksheet' failed [email protected] Excel Discussion (Misc queries) 1 December 7th 05 11:20 PM
Method 'Add' of object 'CommandBarControls' failed LAF Excel Discussion (Misc queries) 0 September 12th 05 02:02 PM


All times are GMT +1. The time now is 03:08 AM.

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

About Us

"It's about Microsoft Excel"