Hello all,

Win2000 & 2003 Server has a Fax Service that i would like to use to fax some of my MS Access reports. I found the following code, which works if i specify a file name and location, but when i try assigning an MS Access report rather than a file name and location, i get an error. Help please.


'You must reference the Fax com 1.0 type lib for this code to work
Dim strComputer As String
strComputer = "Server" 'Your computer name here
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("c:\Company.txt")
With oFaxDoc
.FaxNumber = "333-3233"
.DisplayName = "Test"
Dim lngSend As Long
lngSend = .Send
End With
Set oFaxDoc = Nothing
Set oFaxServer = Nothing
Exit Sub