Fax with Win2k & XP
![Visual Basic 6, or VB Classic Visual Basic 6, or VB Classic](https://www.fortypoundhead.com//assets/img/icons/v7/vb6.png)
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
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.