{"id":25,"date":"2009-10-02T20:23:01","date_gmt":"2009-10-03T01:23:01","guid":{"rendered":"http:\/\/anvil-of-time.com\/2009\/10\/02\/powerbuilder-ole-with-facsys-to-fax-a-document\/"},"modified":"2021-03-08T17:47:36","modified_gmt":"2021-03-08T22:47:36","slug":"powerbuilder-ole-with-facsys-to-fax-a-document","status":"publish","type":"post","link":"https:\/\/anvil-of-time.com\/powerbuilder\/powerbuilder-ole-with-facsys-to-fax-a-document\/","title":{"rendered":"PowerBuilder &#8211; OLE with Facsys to Fax a Document"},"content":{"rendered":"<p>Here is a old post I put on Tek-Tips.com way back in 2001.<\/p>\n<p>I have just implemented an OLE faxing solution in my PB7 app using Facsys.<\/p>\n<p>This code creates the session, addresses the fax message, then attaches a previously created MSWord document to the fax.<\/p>\n<pre name=\"code\" class=\"VB\">lole_facsys = Create OLEObject\nli_rc = lole_facsys.ConnectToNewObject(&quot;facsys.faxsession&quot;)\n\/\/Check for the return code\nIf li_rc &lt;&gt; 0 Then\n   \/\/ ERROR CONDITION\n   Messagebox(&quot;ERROR&quot;,li_rc)\n   Destroy lole_facsys\n   Return li_rc\nEnd If\n\/\/ log on to server (SERVER, ID, PASSWORD)\nlole_facsys.logon(&quot;PRC00&quot;,&quot;00MNB&quot;,&quot;&quot;)\nlole_faxmsg = lole_facsys.createmessage()\nlole_faxmsg.text = &#039;Expedite \/ De Expedite Notice&#039;\nlole_recipient = lole_faxmsg.recipients.add()\nlole_recipient.Name = &#039;Matt Balent&#039;\nlole_recipient.faxnumber = &#039;18105555078&#039;\n\/\/ previously saved word doc\nlole_attachmnt = lole_faxmsg.attachments.add(&#039;C:\\vfax.doc&#039;)\nlole_attachmnt.type = 14 \/\/ MS word\nli_rc = lole_faxmsg.send()\ndestroy lole_attachmnt\ndestroy lole_recipient\ndestroy lole_faxmsg\nlole_facsys.logoff()\ndestroy lole_facsys\n<\/pre>\n<p>This assumes you have Facsys installed on the user&#8217;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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a old post I put on Tek-Tips.com way back in 2001. 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. lole_facsys = Create OLEObject li_rc = lole_facsys.ConnectToNewObject(&quot;facsys.faxsession&quot;) \/\/Check for&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[14,12,13,16],"_links":{"self":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts\/25"}],"collection":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/comments?post=25"}],"version-history":[{"count":8,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts\/25\/revisions"}],"predecessor-version":[{"id":1720,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts\/25\/revisions\/1720"}],"wp:attachment":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/media?parent=25"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/categories?post=25"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/tags?post=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}