Gene McDonald
Forum Replies Created
-
AuthorPosts
-
Gene McDonaldParticipant
I’m attempting this one more time since my client has your product and we need to be able to send faxes out of the MS Access application that I’ve developed for him.
You guys do not have a sample in VB but I’m using the “Microsoft Internet Controls” control in MS Access to create the fax. Hopefully you’ve got someone there that can help. I’ve managed to connect to the fax server with the following response.
<?xml version=”1.0″ encoding=”UTF-8″ ?>
– <response>
<message>Success</message>
</response>
I put the XML text in vPost. Does this seem right? Can I send it after the response. I would really like to finish this up.
My code is as follows. It runs in a form with the MS internet active x control (very basic)
Private Sub Form_Load()
Dim FSO As New FileSystemObject
Dim txtstrm As TextStream
Dim vPost As Variant
Dim vHeaders As Variant
Dim vFlags As Variant
‘ this reads a text file with my xml info and puts it in vPost – it is included below
Set txtstrm = FSO.OpenTextFile(“C:CollectionsFaxXML_Info.txt”, ForReading)
vPost = txtstrm.ReadAll
txtstrm.Close
Dim vTarget As Variant
vHeaders = “content-type: application/xml” & Chr(10) + Chr(13) & “authorization: Basic YWRtaW46YWRtaW4=” & Chr(10) & Chr(13)
Set WV = Me!WebBrowser0.Object ‘ set my web control object
WV.Navigate “http://192.168.1.13/ffws/v1/ofax” & Chr(10) + Chr(13), vFlags, vTarget, vPost, vHeaders ‘calls your server
End Sub
XML info that is put in vPost
<schedule_fax>
<recipient>
<name>Kelly</name>
<organization>Recipient</organization>
<fax_number>000-000-0000</fax_number>
</recipient>
<attachment>
<location>inline</location>
<name>FaxTest.txt</name>
<content_type>text/plain</content_type>
<content_transfer_encoding>base64</content_transfer_encoding>
<content>dGVzdA==</content>
</attachment>
<max_tries>3</max_tries>
<priority>3</priority>
<try_interval>30</try_interval>
<receipt>failure</receipt>
<receipt_attachment>none</receipt_attachment>
</schedule_fax>
Gene McDonaldParticipantAll of these sure seem like a lot of work just to send a fax. An active x control or a library sure would be nice. Thanks for the information I’ll see if I can put something together.
-
AuthorPosts