FaxWorks Dynamic Data Exchange (DDE) Interface


Introduction:

The FaxWorks DDE interface allows applications to send faxes 
to single or multiple locations without interacting with the 
FaxWorks Phone book dialog box, by sending the destination 
data directly to FaxWorks. The applications send the data by 
calling DDEClientTransaction function. 

Supported DDE Commands:

FaxWorks supports the macro commands listed below, which are 
required to Initiate and Send Data to FaxWorks


DDEInitiate
===========
    DDEInitiate("FAXWORKS","MEMSTRENTRY")

This command initiates the DDE session and returns the 
channel number that is used for all the other DDE 
commands.

    Example:
        ChanNum=DDEInitiate("FAXWORKS","MEMSTRENTRY")


DDEPoke
=======
This command is the means of communication between the 
application and FaxWorks.  You cannot use DDEPoke until 
you have received a Channel Number from DDEInitiate.

DDEPoke -- DOCUMENT
------------------- 
This identifies the print job which is to be faxed.  
First you identify the job, then you give the 
destinations.  If the FaxWorks printer driver receives 
a job other than the one described by the "DOCUMENT" 
DDEPoke command, it will prompt the user for the 
destination information.


    DDEPoke(ChanNum,"DOCUMENT","<Application Name>")

    Example:
        DDEPoke(ChanNum,"DOCUMENT","Microsoft Word")


DDEPoke -- DESTINATION
----------------------
This command provides the information about the 
destination or destinations for the fax.  This command 
may be repeated to provide multiple information.  The 
only parameter required is the fax number.  If you 
ommit a parameter, you must ommit all following 
parameters.
 
    DDEPoke(ChanNum,"DESTINATION","[Fax Number], 
        [Name of Receiver],[Company Name],
        [Time for Send], [Date to Send]")


    Example:
    
        DDEPoke(ChanNum,"DESTINATION",
                "[1-404-499-2521],[Jon Livingston],
                [The Dynamic Computers],
                [08:30:00],[10-26-92]")


DDEPoke -- ORIGINATOR
---------------------
This command provides the information about the the fax 
sender and also controls the quality of the fax 
(whether it is sent in "Fine" or "Standard" quality.  
The Quality field must be "FINE" or "NORMAL".

    DDEPoke(ChanNum,"ORIGINATOR","[Sender's Name],
        [Sender's Company],[Sender's    Fax/Phone],         
        [Quality]")

    Example:
        DDEPoke(ChanNum,"ORIGINATOR",
                "[Kristin Thomas],
                [Solutions Unlimited],
                [011-92-21-478120],[FINE]")

DDETerminate
============

    DDETerminate(ChanNum)       

This command terminates the linkage between the 
application and FaxWorks.

    Example:

        DDETerminate(ChanNum)


A Sample Macro
==============

Following is an example that illustrates a macro 
written for use with Microsoft Word for Windows 2.0. 
Complex macros to for more user friendly access can be 
written using other Word Basic Commands.  Note that 
FilePrintDefault() is a Word Basic command which is 
documented by Microsoft Word.  This command would be 
different for other applications.

Sub MAIN
  ChanNum = DDEInitiate("FAXWORKS", "MEMSTRENTRY")
  DDEPoke(ChanNum, "DOCUMENT", "Microsoft Word")
  DDEPoke(ChanNum, "DESTINATION", "[1 (404)984-9956], 
           [Attn: DDE Spec], [SofNet, Inc.] ")
  DDEPoke(ChanNum, "DESTINATION", "[555-1212], 
           [Jon Livingston], [Company Name]")
  DDETerminate(ChanNum)
  FilePrintDefault()
End Sub


