Search Tools Links Login

Fax with Win2k & XP


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!

Original Author: Dave

Assumptions

Make a reference to Fax COM Type lib 1.0

Code

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

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 117 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.