Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Jan 2003
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Faxing Docs from Multiple PCs

    I'm working on an Excel macro to fax documents. I've got it working on my PC, but other users fail on the .activeprinter assignment. Mine works when I assign "FILESERVERFax on Ne02:" to .activeprinter. Other PCs have a different ne0x: value.

    How can I determine the port ID inside the macro?

    Thanks, much.

    Dan <img src=/S/help.gif border=0 alt=help width=23 height=15>

  2. #2
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Faxing Docs from Multiple PCs

    What operating systems(s) will this run under?
    I've got some notes somewhere to extract the info from the registry - I'll endeavour to dig them out.

  3. #3
    Lounger
    Join Date
    Jan 2003
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Faxing Docs from Multiple PCs

    Who cares about messy? Not me!

    Works like a charm. For future readers, it should be two slashes before the server name.

    Leif, great solution. I had been looking into all kinds of complicated registry gets, and such. This is much simpler.

    Thanks,

    Dan

  4. #4
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Faxing Docs from Multiple PCs

    Glad to be of help.
    For the record, I corrected the mistake you pointed out in the path-name in my post - just in case someone doesn't catch on.
    Cheers.

  5. #5
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Faxing Docs from Multiple PCs

    Edited 11-Jun-01 to correct error in pathname

    This is messy, but appears to work:
    <pre>Sub GetFax()
    AP = Application.ActivePrinter
    x = 10
    On Error GoTo 0
    On Error Resume Next
    Application.ActivePrinter = 1 'Force initial Err.Number = 1004
    Do While Err.Number = 1004
    x = x - 1
    Err.Clear
    FaxPrinter = "FILESERVERFax on Ne0" + CStr(x) + ":"
    Application.ActivePrinter = FaxPrinter
    Loop

    On Error GoTo Ext

    PrintFax:
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:=FaxPrinter
    Ext:
    Application.ActivePrinter = AP
    End Sub</pre>


    Also, you may care to note my experiences in <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=xl&Number=4035&page=&view=& sb=&vc=1>this post</A> from the Excel board.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •