B
Bill Nguyen
please tell me what I am missing in the snippet below:
Dim fxServer As New FaxServer
Dim fxDoc As New FaxDocument
Dim fxID As Integer
fxDoc = CreateObject("FAXCOMEX.FaxDocument")
'Set file name of document.
Try
fxDoc.Body = "C:\dotnet\gartner.doc" 'Send this document- Give a valid path
'***MUST***
fxDoc.DocumentName = "Test Fax"
fxDoc.Recipients.Add("9999999") 'Sending Number ' Must '9 for prefix in my
case.
'Set the sender properties.
fxDoc.Sender.Name = "Bill "
fxDoc.Sender.FaxNumber = "9999999" 'Put a valid number to avoid error
'
'Submit the document to the connected fax server and get back the job ID.
' fxID = fxDoc.Submit("printserver") 'Fax server name Regent which can be a
remote server.
'------------------------
fxDoc = Nothing
fxServer = Nothing
Catch
Dim ex As Exception
MsgBox(ex.ToString)
End Try
Exit Function
Dim fxServer As New FaxServer
Dim fxDoc As New FaxDocument
Dim fxID As Integer
fxDoc = CreateObject("FAXCOMEX.FaxDocument")
'Set file name of document.
Try
fxDoc.Body = "C:\dotnet\gartner.doc" 'Send this document- Give a valid path
'***MUST***
fxDoc.DocumentName = "Test Fax"
fxDoc.Recipients.Add("9999999") 'Sending Number ' Must '9 for prefix in my
case.
'Set the sender properties.
fxDoc.Sender.Name = "Bill "
fxDoc.Sender.FaxNumber = "9999999" 'Put a valid number to avoid error
'
'Submit the document to the connected fax server and get back the job ID.
' fxID = fxDoc.Submit("printserver") 'Fax server name Regent which can be a
remote server.
'------------------------
fxDoc = Nothing
fxServer = Nothing
Catch
Dim ex As Exception
MsgBox(ex.ToString)
End Try
Exit Function