• Faxing Docs from Multiple PCs

    • This topic has 4 replies, 2 voices, and was last updated 24 years ago.
    Author
    Topic
    #356740

    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 help

    Viewing 1 reply thread
    Author
    Replies
    • #528925

      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.

    • #528931

      Edited 11-Jun-01 to correct error in pathname

      This is messy, but appears to work:

      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

      Also, you may care to note my experiences in this post from the Excel board.

      • #529056

        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

        • #529064

          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.

    Viewing 1 reply thread
    Reply To: Reply #529064 in Faxing Docs from Multiple PCs

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel