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

winfax DDE in VFP - usage of variables

Status
Not open for further replies.

clmcdade

Programmer
Joined
Oct 4, 2001
Messages
6
Location
US
I have the following segment of code intended to send out faxes from a query list, however when I replace actual data with variables, winfax doesn't seem to recognize the data. Is there something simple that I may be missing with the replacement variables? For example, in the first 'retvar' assignment, I want to replace the text string with a variable name from a table, and so on with the other fields required by winfax...

* Set up WinFax
FaxChan=DDEInitiate("FAXMNG32","CONTROL")
retvar=DDEExecute(FaxChan,"GoIdle")
FaxChan=DDEInitiate("FAXMNG32","TRANSMIT")
retvar=DDEPoke(FaxChan,"sendfax",'attach("s:\chris\jill\assoc1.txt")')
****retvar=DDEPoke(FaxChan,"sendfax",'recipient("6819032","11:11:11","10/10/01", ;
****"Chris","cm","test stmt","test","0000","Fax")')
retvar=DDEPoke(FaxChan,"sendfax",'recipient("6819032","01:00:00","10/10/15", ;
"Christest","cm","test stmt","test","0000","Fax")')
** retvar=DDEPoke(FaxChan,"Sendfax",'resolution("HIGH")') && or "LOW"
retvar=DDEExecute(FaxChan,"GoActive")
retvar=DDEPoke(FaxChan,"sendfax",'showsendscreen("1")') && show send screen
retvar=DDEPoke(FaxChan,"sendfax","SendFaxUI")
retvar=DDETerminate(FaxChan)
 
This is just a follow-up to the original post :

In trying to use 'CreateObject' i.e. CreateObject("winfax.SDKSend") I am still getting the following
message : "Class definition ... is not found"
I already have winfax running when I do this yet still
receive the error message.

Does anyone know the correct syntax for the createobject statement?

** This creates the object for WinFax
private oWFSend
oWFSend=CreateObject("winfax.SDKSend")
oWFSend.SetResolution(0)
oWFSend.ShowCallProgress(1)
oWFSend.ShowSendScreen (0)
oWFSend.SetNumber(mfaxno)
oWFSend.SetSubject(mfaxsubj)
** oWFSend.SetCompany()
oWFSend.SetTo(mfaxname)

oWFSend.AddRecipient
oWFSend.Send (1)
*

Thank you for your help.

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top