We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

.NET System Cannot Find File  While Sending Fax Using FAXCOMLib

Medium Priority
649 Views
Last Modified: 2013-12-17
Good Day:

I am creating a WinForms application using VB.NET 2005 and SQL Server.  I am trying to send a text fax using the following sample code, but I get an error that reads:  Cannot Find File for the following line of code:

My entire code is as follows:
Dim fxsrv As FAXCOMLib.FaxServer = New FAXCOMLib.FaxServer
Dim fxdoc As FAXCOMLib.FaxDoc = CType(fxsrv.CreateDocument("C:\Denise\faxtest2.TXT"), FAXCOMLib.FaxDoc)

        fxdoc.FileName = "C:\Denise\faxtest2.TXT"
        fxdoc.FaxNumber = "17145550741"
        'Main
        fxdoc.RecipientName = "Bharath Reddy VasiReddy"
        fxdoc.RecipientOffice = "eXensys"
        fxdoc.RecipientOfficePhone = "04023000891"
        fxdoc.RecipientState = "Andhra Pradesh"
        fxdoc.RecipientDepartment = "Development"
        fxdoc.RecipientCountry = "India"
        fxdoc.RecipientCity = "Hyderabad"
        fxdoc.RecipientAddress = "White Fields Servery No:6"
        fxdoc.RecipientCompany = "eXensys Software Solutions Ltd"
        fxdoc.SenderAddress = "White Fields Servery No:6"
        fxdoc.SenderCompany = "eXensys"
        fxdoc.SenderDepartment = "Development"
        fxdoc.SenderHomePhone = "04023000981"
        fxdoc.SenderTitle = "Bharath Reddy"
        fxdoc.FileName = "fbharath.txt"
        fxdoc.FaxNumber = "17145550741"
        'Main
        fxdoc.RecipientName = "Bharath Reddy VasiReddy"
        fxdoc.RecipientOffice = "eXensys"
        fxdoc.RecipientOfficePhone = "04023000891"
        fxdoc.RecipientState = "Andhra Pradesh"
        fxdoc.RecipientDepartment = "Development"
        fxdoc.RecipientCountry = "India"
        fxdoc.RecipientCity = "Hyderabad"
        fxdoc.RecipientAddress = "White Fields Servery No:6"
        fxdoc.RecipientCompany = "eXensys Software Solutions Ltd"
        fxdoc.SenderAddress = "White Fields Servery No:6"
        fxdoc.SenderCompany = "eXensys"
        fxdoc.SenderDepartment = "Development"
        fxdoc.SenderHomePhone = "04023000981"
        fxdoc.SenderTitle = "Bharath Reddy"
        fxsrv.Connect(Environment.MachineName)
        fxdoc.Send()                'The system cannot find the file specified.
        fxsrv.Disconnect()

Thank You,
Denise


Comment
Watch Question

Commented:
Hi,

Have you tried adding a path to the file in this line?

        fxdoc.FileName = "fbharath.txt"


/peter

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Top Expert 2009
Commented:
Does the application have permissions to the C:\Denise folder?

Also there's a line that says:

fxdoc.FileName = "fbharath.txt"

Where is this file coming from? Try giving the full path to this file and see if that fixes it.

Author

Commented:
Hello All,

I changed the fxdoc.FileName = "fbharath.txt" to "C:\Denise\faxtest2.TXT".  I also changed the folder properties to Share and gave users full control.  Now I get an error that reads:The object identifier does not represent a valid object.

Any More Suggestions?
Thank You,
Denise
Top Expert 2009
Commented:
Ok, at what line does this error appear?

Author

Commented:
Same line from the original question:
fxdoc.Send()

Author

Commented:
The mystery has been solved.  I was told there was a modem installed, but they have not installed it yet.  

Thanks for your help.  

Denise
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.