[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 617
  • Last Modified:

.NET System Cannot Find File While Sending Fax Using FAXCOMLib

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


0
DeniseGoodheart
Asked:
DeniseGoodheart
  • 3
  • 2
3 Solutions
 
pivarCommented:
Hi,

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

        fxdoc.FileName = "fbharath.txt"


/peter

0
 
nmarunCommented:
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.
0
 
DeniseGoodheartAuthor 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
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
nmarunCommented:
Ok, at what line does this error appear?
0
 
DeniseGoodheartAuthor Commented:
Same line from the original question:
fxdoc.Send()
0
 
DeniseGoodheartAuthor 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
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now