Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Faxing witgh WINDOWS XP

Status
Not open for further replies.

VictorFRodriguez

Programmer
Jan 20, 2001
51
DO
I have the following code that works perfectly with Windows 2000 but shows an OLE error code with Windows XP. Do you have something good for WIN XP?
***************************************
CODE FOR WINDOWS 2000 TO FAX A WORD DOC
lcFaxNum="565-0008"
lcTmpDoc="RESTAURANTES.DOC"
* lnRecipCnt = THIS.oMsg.ContactList.Person_Count
lnRecipCnt = "Atencion: Gerente General"
loFaxServer=createobject('faxserver.faxserver')
loFaxServer.connect( '\\'+alltrim(LEFT(SYS(0),at('#',SYS(0))-1) ) )

loFaxDocument = loFaxServer.createdocument(lcTmpDoc)
loFaxDocument.faxnumber = lcFaxNum

loFaxDocument.filename = lcTmpDoc
loFaxDocument.sendcoverpage = .f.

* Send it Off!
* (you should see Word open briefly and print the document,
* then the Microsoft Fax icon should show up in the system tray
* and try to send the fax!)
loFaxDocument.Send


loFaxServer.Disconnect
RELEASE loFaxDocument, loFaxServer
 
VictorFRodriguez

I have tried your code and I too get an OLE error, referring to to an invalid handle on the document, I have not researched the error, but if you look at faq184-1769 (the last item), sending a fax via CDO might be an option that works for you.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top