Public Sub SendFax()
Dim FaxServer As Object
Dim FaxDoc As Object
Set FaxServer = CreateObject("Faxserver.FaxServer")
'Create FaxServer object...
'<---This line does not produces an error.
If (FaxServer.Connect("Fax")) Then
MsgBox "Failed to connect"
End If
'Create document
Dim FaxFile As String
FaxFile = "C:\Work\Projects\Serck Controls\Vb\FaxSender\Message.txt"
Set FaxDoc = FaxServer.CreateDocument(FaxFile)
FaxDoc.FaxNumber = "0,49543543"
FaxDoc.RecipientName = "John Doe"
Dim iReturn As Integer
iReturn = FaxDoc.Send '<--- Failed to Send
FaxDoc = Nothing
FaxServer.Disconnect
FaxServer = Nothing
End Sub
I have referenced the fxscom.dll but it fails to send can anyone help?
Do i have to set anything up in the xp enviroment?
#Mandix Repository#************************************************************
' * Programmer Name : Dave Buckner
' * WebSite : http://www.d2dsources.com
' * Date : 16/05/02
' **********************************************************************
' * Comments : Fax with Win2k & XP
' *
' * Fax with Win2k & XP
' *
' **********************************************************************
Description: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
'
Private Sub Form_Load()
Dim lngSend As Long
Dim strComputer As String
Dim oFaxServer As FAXCOMLib.FaxServer
Dim oFaxDoc As FAXCOMLib.FaxDoc
On Error Goto ErrHandler
strComputer = "yourComputerName"
Set oFaxServer = New FAXCOMLib.FaxServer
oFaxServer.Connect strComputer
oFaxServer.ServerCoverpage = 0
Set oFaxDoc = oFaxServer.CreateDocument(App.Path & "\" & "New Text Document.txt")
With oFaxDoc
.FaxNumber = "5551212"
.DisplayName = "Fax Server"
lngSend = .Send
End With
Set oFaxDoc = Nothing
oFaxServer.Disconnect
Set oFaxServer = Nothing
Exit Sub
ErrHandler:
MsgBox Err.Number & " " & Err.Description
Err.Clear
End Sub
Hi, how is your problem going on ? have u solved it ?
Cristy
0
cossy74Author Commented:
Sorry, i went away on holidays an got back this morning.
Crisy56: No the problem exists because to solutions require exchange which i donot have.
If i have read these answer wrongly please advise.
0
Question has a verified solution.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
' * Programmer Name : Dave Buckner
' * WebSite : http://www.d2dsources.com
' * Date : 16/05/02
' **************************
' * Comments : Fax with Win2k & XP
' *
' * Fax with Win2k & XP
' *
' **************************
Description: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
'
Private Sub Form_Load()
Dim lngSend As Long
Dim strComputer As String
Dim oFaxServer As FAXCOMLib.FaxServer
Dim oFaxDoc As FAXCOMLib.FaxDoc
On Error Goto ErrHandler
strComputer = "yourComputerName"
Set oFaxServer = New FAXCOMLib.FaxServer
oFaxServer.Connect strComputer
oFaxServer.ServerCoverpage
Set oFaxDoc = oFaxServer.CreateDocument(
With oFaxDoc
.FaxNumber = "5551212"
.DisplayName = "Fax Server"
lngSend = .Send
End With
Set oFaxDoc = Nothing
oFaxServer.Disconnect
Set oFaxServer = Nothing
Exit Sub
ErrHandler:
MsgBox Err.Number & " " & Err.Description
Err.Clear
End Sub
--------------------------
Cristy