473,394 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Operation Failed error using FAXCOMEXLib

I am currently in the process of building a vb.net windows application that
will be used to send faxes and monitor these faxes as they are sent. In the
project I am building the fax functionality into a single web form in order
to encapsulate this functionality. The error I am receiving has brought me to
the point of starting a brand new project with just the web-form for faxing.
I am using code provided by Microsoft:
http://msdn.microsoft.com/library/de...using_27co.asp

This is throwing an error when it reaches the following line of code:
JobID = objFaxDocument.ConnectedSubmit(objFaxServer)

The error it is throwing is as follows:
exc.Message: 'Operation Failed'
exc.Source: 'FaxComEx.FaxDocument.1'

The entire code snippet that I am using in the form load is below:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

'Declare fax variables...
Dim objFaxServer As New FAXCOMEXLib.FaxServer()
Dim objFaxDocument As New FAXCOMEXLib.FaxDocument()
Dim JobID As Object

Try

'Connect to the fax server...
objFaxServer.Connect("")

'Set the fax body
objFaxDocument.Body = "c:\fax.txt"

'Name the document
objFaxDocument.DocumentName = "My First Fax"

'Set the fax priority
objFaxDocument.Priority = FAX_PRIORITY_TYPE_ENUM.fptHIGH

'Add the recipient with the fax number 12225550100
objFaxDocument.Recipients.Add("555-5555", "Bud")

'Choose to attach the fax to the fax receipt
objFaxDocument.AttachFaxToReceipt = True

'Provide the cover page note
objFaxDocument.Note = "Here is the info you requested"

objFaxDocument.Subject = "Today's fax"

'Set the sender properties.
objFaxDocument.Sender.Title = "Mr."
objFaxDocument.Sender.Name = "Bob"
objFaxDocument.Sender.City = "Cleveland Heights"
objFaxDocument.Sender.State = "Ohio"
objFaxDocument.Sender.Company = "Microsoft"
objFaxDocument.Sender.Country = "USA"
objFaxDocument.Sender.Email = "so*****@microsoft.com"
objFaxDocument.Sender.FaxNumber = "12165555554"
objFaxDocument.Sender.HomePhone = "12165555555"
objFaxDocument.Sender.OfficeLocation = "Downtown"
objFaxDocument.Sender.OfficePhone = "12165555553"
objFaxDocument.Sender.StreetAddress = "123 Main Street"
objFaxDocument.Sender.TSID = "Office fax machine"
objFaxDocument.Sender.ZipCode = "44118"
objFaxDocument.Sender.BillingCode = "23A54"
objFaxDocument.Sender.Department = "Accts Payable"

'Save sender information as default
objFaxDocument.Sender.SaveDefaultSender()

'Submit the document to the connected fax server
'and get back the job ID.
JobID = objFaxDocument.ConnectedSubmit(objFaxServer)

MsgBox("The Job ID is :" & JobID(0))

Catch exc As Exception

MsgBox("Exception message: " & exc.Message & vbCrLf & "Exception
Source: " & exc.Source)

End Try

End Sub
Nov 22 '05 #1
1 5521
This problem has been resolved. After pounding my head against a wall for
about a day, it turns out that I needed to uninstall the MS Fax service and
then re-install it onto Windows Server 2003 Standard Edition.

I tested this by just trying to send out a fax through the fax console
manually. This failed and signified to me that somehow the MS Fax Service
installation became corrupted. Nothing changed on the fax server so this is
slightly worrying, but then again what fun would it be if it worked all the
time?

"Brett" wrote:
I am currently in the process of building a vb.net windows application that
will be used to send faxes and monitor these faxes as they are sent. In the
project I am building the fax functionality into a single web form in order
to encapsulate this functionality. The error I am receiving has brought me to
the point of starting a brand new project with just the web-form for faxing.
I am using code provided by Microsoft:
http://msdn.microsoft.com/library/de...using_27co.asp

This is throwing an error when it reaches the following line of code:
JobID = objFaxDocument.ConnectedSubmit(objFaxServer)

The error it is throwing is as follows:
exc.Message: 'Operation Failed'
exc.Source: 'FaxComEx.FaxDocument.1'

The entire code snippet that I am using in the form load is below:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

'Declare fax variables...
Dim objFaxServer As New FAXCOMEXLib.FaxServer()
Dim objFaxDocument As New FAXCOMEXLib.FaxDocument()
Dim JobID As Object

Try

'Connect to the fax server...
objFaxServer.Connect("")

'Set the fax body
objFaxDocument.Body = "c:\fax.txt"

'Name the document
objFaxDocument.DocumentName = "My First Fax"

'Set the fax priority
objFaxDocument.Priority = FAX_PRIORITY_TYPE_ENUM.fptHIGH

'Add the recipient with the fax number 12225550100
objFaxDocument.Recipients.Add("555-5555", "Bud")

'Choose to attach the fax to the fax receipt
objFaxDocument.AttachFaxToReceipt = True

'Provide the cover page note
objFaxDocument.Note = "Here is the info you requested"

objFaxDocument.Subject = "Today's fax"

'Set the sender properties.
objFaxDocument.Sender.Title = "Mr."
objFaxDocument.Sender.Name = "Bob"
objFaxDocument.Sender.City = "Cleveland Heights"
objFaxDocument.Sender.State = "Ohio"
objFaxDocument.Sender.Company = "Microsoft"
objFaxDocument.Sender.Country = "USA"
objFaxDocument.Sender.Email = "so*****@microsoft.com"
objFaxDocument.Sender.FaxNumber = "12165555554"
objFaxDocument.Sender.HomePhone = "12165555555"
objFaxDocument.Sender.OfficeLocation = "Downtown"
objFaxDocument.Sender.OfficePhone = "12165555553"
objFaxDocument.Sender.StreetAddress = "123 Main Street"
objFaxDocument.Sender.TSID = "Office fax machine"
objFaxDocument.Sender.ZipCode = "44118"
objFaxDocument.Sender.BillingCode = "23A54"
objFaxDocument.Sender.Department = "Accts Payable"

'Save sender information as default
objFaxDocument.Sender.SaveDefaultSender()

'Submit the document to the connected fax server
'and get back the job ID.
JobID = objFaxDocument.ConnectedSubmit(objFaxServer)

MsgBox("The Job ID is :" & JobID(0))

Catch exc As Exception

MsgBox("Exception message: " & exc.Message & vbCrLf & "Exception
Source: " & exc.Source)

End Try

End Sub

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brett | last post by:
I am currently in the process of building a vb.net windows application that will be used to send faxes and monitor these faxes as they are sent. In the project I am building the fax functionality...
0
by: kmcnet | last post by:
Hello Everyone and thanks for your help in advance. I am working on a project that requires the programming of the MS Fax Service. I need to be able to react to events, specifically and incoming...
0
by: CTDev Team | last post by:
Hi, We are using Exchange Server 5.5, and have applications written in VB6 and C# that read and process emails. We are experiencing intermittent errors similar to C# Application ...
0
by: | last post by:
Hi, I am using VS2003 .NET. I have a union in my files which is generated by YACC. I am getting the following errors while linking using link.exe(Microsoft (R) Incremental Linker Version...
1
by: Laurent Lequenne | last post by:
Hello There, I just converted a VS 2003 C++ Project into VS 2005. I already made some changes in my headers files, has I had compilations errors with enums declarations. Now everything compiles...
2
by: Rick | last post by:
VS.NET 2005 I am developing a fax routine in a NET program using the FAXCOMExLib.dll Everything works as planned when I run from my development machine. When I put the program on the server...
0
by: tekiegreg | last post by:
Hi there, here is a snippet of my code that I've been getting an error message on, basically what I've been trying to do is pull out appointments, serialize to an object as well as all the contacts...
1
by: Ryan Liu | last post by:
Hi, I have a 100 clients/ one server application, use ugly one thread pre client approach. And both side user sync I/O. I frequently see the error on server side(client side code is same, but...
0
by: Kent Bolton | last post by:
We have had the same issue ... it seems that the COM Interop wrapper leaks quite a lot of memory when iterating through the faxes in the folders. We found that we could avoid this by iterating...
1
by: Author | last post by:
It looks like that there is very little resource about the Enterprise Library on the Web. I know it is documented at msdn, but I haven't found a whole lot sample codes. I was trying out the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.