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("ERROR",li_rc)
Destroy lole_facsys
Return li_rc
End If
// log on to server
lole_facsys.logon("PRC00","00MNB",""
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.
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("ERROR",li_rc)
Destroy lole_facsys
Return li_rc
End If
// log on to server
lole_facsys.logon("PRC00","00MNB",""
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.