VictorFRodriguez
Programmer
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
***************************************
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