VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Fax with Win2k & XP

by Dave Buckner (2 Submissions)
Category: OLE/COM/DCOM/Active-X
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (9 Votes)

With this snippet you can fax from any windows 2000 and windows XP box with Fax Services! The only other way to share a fax otherwise is Small Business server. All feedback is welcome!

Assumes
Make a reference to Fax COM Type lib 1.0

Rate Fax with Win2k & XP

Private Sub Form_Load()
  On Error GoTo ErrHandler
  Dim strComputer As String
  strComputer = "yourComputerName"
  
  Dim oFaxServer As FAXCOMLib.FaxServer
  Set oFaxServer = New FAXCOMLib.FaxServer
  Dim oFaxDoc As FAXCOMLib.FaxDoc
  
  oFaxServer.Connect strComputer
  oFaxServer.ServerCoverpage = 0
  Set oFaxDoc = oFaxServer.CreateDocument(App.Path & "\" & "New Text Document.txt")
  
  With oFaxDoc
    .FaxNumber = "5551212"
    .DisplayName = "Fax Server"
    Dim lngSend As Long
    lngSend = .Send
  End With
  
  Set oFaxDoc = Nothing
  oFaxServer.Disconnect
  Set oFaxServer = Nothing
  Exit Sub
ErrHandler:
  MsgBox Err.Number & " " & Err.Description
End Sub

Download this snippet    Add to My Saved Code

Fax with Win2k & XP Comments

No comments have been posted about Fax with Win2k & XP. Why not be the first to post a comment about Fax with Win2k & XP.

Post your comment

Subject:
Message:
0/1000 characters