VoiceGuide IVR Software Main Page
Jump to content

Winfax

Recommended Posts

Hello,

 

I am trying to send a word doc to be faxed by winfax 10.02.

 

I am trying both example 1 and 2 in the support information as shown below this message.

 

In example 1, I just get the ms word doc opened in another window.

In example 2, all appears to process without any errors but no fax appears in the queue.

 

Is there anything different concerning the use of vb script to use winfax?

 

Example : Sending a Fax - 1

 

The VBScript below will fax out a Word document "c:\info\prices1.doc" to fax number 5554321. Note: WinFax or another scriptable faxing agent is needed in order for the scripts demonstrating faxing out to work.

 

Dim WordApp

Dim myWordDoc

Dim strPathDoc

Dim intRecord

 

Set WordApp = CreateObject("word.application")

WordApp.Visible = True

strPathDoc = "c:\info\prices1.doc"

Set myWordDoc = WordApp.Documents.Open(strPathDoc)

myWordDoc.ActiveWindow.Document.SendFax("5554321")

 

'always deallocate after use...

Set myWordDoc = Nothing

Set WordApp = Nothing

 

Example : Sending a Fax - 2

 

This example builds on previous example by using Result Variables in the VBScript. The example below uses values entered by the caller in the 'Get Fax Number' and 'Select Price List' Get Number modules. The two result variables will be replaced with their actual values before the VBScript is run.

 

Dim WordApp

Dim myWordDoc

Dim strPathDoc

Dim intRecord

 

Set WordApp = CreateObject("word.application")

WordApp.Visible = True

strPathDoc = "c:\info\prices$RV[select Price List].doc"

Set myWordDoc = WordApp.Documents.Open(strPathDoc)

myWordDoc.ActiveWindow.Document.SendFax("$RV[Get Fax Number]")

 

 

'always deallocate after use...

Set myWordDoc = Nothing

Set WordApp = Nothing

Share this post


Link to post

For these Examples to work you need to setup WinFax as the default faxing application for MS Office. You should contact WinFax and maybe MS to see how that is done with the version of MS Word which you are using.

 

Have a look at the "Sending a Fax directly with WinFax" example which is listed in the Help file a bit lower down after the examples you quoted:

Existing WinFax's .fxd documents can be sent directly using a VBScript below :

 

Dim objWinfaxSend

Set objWinfaxSend = CreateObject("WinFax.SDKSend8.0")

objWinfaxSend.SetTypeByName "Fax"

objWinfaxSend.ShowSendScreen (0)

objWinfaxSend.SetUseCover(0)

objWinfaxSend.SetSubject ("Property Information")

objWinfaxSend.SetNumber ("$RV[DestFaxNumber]")

objWinfaxSend.AddAttachmentFile("c:\faxes\6013022-flyerfax.fxd")

objWinfaxSend.SetResolution(0)

objWinfaxSend.AddRecipient

objWinfaxSend.Send (0)

objWinfaxSend.Done

Set objWinFaxSend = Nothing

It requires you to use .fxd files - so you need to 'pre-print' them, but communicates with WinFax directly, it does not rely on having MS Office installed on system as well.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×