Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / February 2007

Tip: Looking for answers? Try searching our database.

Macro to send print job to FAX

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tareq - 26 Feb 2007 19:48 GMT
Hi there;
I made the following Macro to send a print to fax machine by pressing (ALT
3) and it works but the issue that after it send the fax job, it sent the fax
machine as the default printer. My question how can I continue using this
Macro without making the fax machine as the default printer. Help:)????

Sub Macro41()
'
' Macro41 Macro
' Macro recorded 1/30/2007 by tareq
'
ActivePrinter = "Network FAX for Windows"
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub
Peter Jamieson - 26 Feb 2007 20:17 GMT
In theory you ought to be able to do something like...

Dim strActivePrinter As String
Dim strFaxPrinter As String
strFaxPrinter="Network FAX for Windows"

' save and set up the active printer
 strActivePrinter = Application.ActivePrinter
 ' don't change the printer if it is already
 ' correctly set up
 ' (I had problems when I tried to switch
 ' to the fax printer in code)
 ' you may need to adjust this for your
 ' fax printer name
 If Left(strActivePrinter, len(strFaxPrinter)) <> strFaxPrinter Then
   Application.ActivePrinter = strFaxPrinter
   Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
   wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages,
_
   ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:=
_
   False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
   PrintZoomPaperHeight:=0
   Application.ActivePrinter = strActivePrinter
 End If

Peter Jamieson

> Hi there;
> I made the following Macro to send a print to fax machine by pressing (ALT
[quoted text clipped - 15 lines]
> PrintZoomPaperHeight:=0
> End Sub
Tareq - 26 Feb 2007 20:36 GMT
Hi there;

Thank you for reply .. but I am not that good with macros .. what do i
change in what you sent me . . . sorry to bother you with this

> In theory you ought to be able to do something like...
>
[quoted text clipped - 43 lines]
> > PrintZoomPaperHeight:=0
> > End Sub
Peter Jamieson - 26 Feb 2007 21:29 GMT
OK, my suggestion is simply...

-----------------------
Sub Macro41x()
Dim strActivePrinter As String
Dim strFaxPrinter As String

 strFaxPrinter="Network FAX for Windows"
 If Left(strActivePrinter, len(strFaxPrinter)) <> strFaxPrinter Then
   Application.ActivePrinter = strFaxPrinter
   Application.PrintOut FileName:="", Range:=wdPrintAllDocument, _
     Item:=wdPrintDocumentContent, Copies:=1, Pages:="", _
     PageType:=wdPrintAllPages, ManualDuplexPrint:=False, Collate:=True, _
     Background:=True, PrintToFile:=False, PrintZoomColumn:=0, _
     PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
   Application.ActivePrinter = strActivePrinter
 End If
End Sub

-----------------------

If that doesn't help, sorry, don't know what else will.

Peter Jamieson

> Hi there;
>
[quoted text clipped - 5 lines]
>> Dim strActivePrinter As String
>> Dim strFaxPrinter As String

strFaxPrinter="Network FAX for Windows"

>> ' save and set up the active printer
>>   strActivePrinter = Application.ActivePrinter
[quoted text clipped - 45 lines]
>> > PrintZoomPaperHeight:=0
>> > End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.