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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Faxing with Facsys (OLE)

Status
Not open for further replies.

mbalent

Programmer
Sep 20, 2001
853
US
I have just implemented an OLE faxing solution in my PB7 app
using Facsys.

This code creates the session, addresses the fax message, then attaches a previously created MSWord document to the
fax.
[start code]
OLEObject lole_facsys, lole_faxmsg, lole_recipient, lole_attachmnt

lole_facsys = Create OLEObject

li_rc = lole_facsys.ConnectToNewObject("facsys.faxsession")
//Check for the return code
If li_rc <> 0 Then
// ERROR CONDITION
Messagebox(&quot;ERROR&quot;,li_rc)
Destroy lole_facsys
Return li_rc
End If
// log on to server
lole_facsys.logon(&quot;PRC00&quot;,&quot;00MNB&quot;,&quot;&quot;)
lole_faxmsg = lole_facsys.createmessage()
lole_faxmsg.text = 'Expedite / De Expedite Notice'
lole_recipient = lole_faxmsg.recipients.add()
lole_recipient.Name = 'Matt Balent'
lole_recipient.faxnumber = '18105555078'
// previously saved word doc
lole_attachmnt = lole_faxmsg.attachments.add('C:\vfax.doc')

lole_attachmnt.type = 14 // MS word
li_rc = lole_faxmsg.send()
destroy lole_attachmnt
destroy lole_recipient
destroy lole_faxmsg
lole_facsys.logoff()
destroy lole_facsys
[end code]

This assumes you have Facsys installed on the user's desktop
and they have an account on the Facsys server AND that the
Facsys server is set up to render the attachment. I used
Facsys v 4.7 on the desktop.

- Matt Balent
- Software Engineer
- Information Management
- Thyssen, Inc. , N.A.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top