Fax Software

Community Forums

This topic contains 3 replies, has 0 voices, and was last updated by  JohnD 16 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2609

    Anonymous
    Member

    I had asked a question elsewhere, but I think this may deserve its own topic. My issue is I want to do a type of mail merge using Access. I am a novice programmer, but can usually take a sample code and modify it for my needs.

    I am not using SDK – I downloaded the files but based on the documentation it’s more than I’m looking for, and apparently not being supported much in XP anyway. I’m using Access97.

    With the code that I’ll post at the end here, I’m able to create a cover page in the Winfax outbox with the information I supply. Separately, I have a process in Access to generate a report which is filtered by fax number. That is, I’ve got a table with, say, 100 records – each record has a field with a fax number in it. Some fax numbers get more than 1 record, so let’s say there are 75 unique fax numbers. I filter the records by fax number and generate the reports, 1 for each fax number means 75 reports. I can print the reports to the Winfax driver, but I also want to send along the fax number and have the fax put on hold or scheduled for a day later.

    Here is the code I’m using (base largely on the Winfax help file) – the issue is I can’t seem to get the report I’m generating in Access to be part of the send process. I would think I would add it somewhere near the end, using a DoCmd.OpenReport statement, but it hasn’t worked so far. The comment
    ‘The SendfaxUI parameter is used only
    ‘when a fax-ready cover page and/or
    ‘attachments are included and you do
    ‘not need to print to the WinFax printer
    ‘driver.
    would seem to provide a clue – I DO want to send it to the WinFax printer driver, and I DON’T need to include the cover page at all – the report is sef-explanatory. I DO want to supply the fax number and scheduling at the same time.

    Any help would be appreciated:

    Private Sub FaxSlsReport_Click()

    faxnumber$ = “555-1212”
    SendTime$ = “06:00:00”
    SendDate$ = “6/25/02”
    FaxName$ = “This is where I put my FaxName”
    Company$ = “My Company”
    Subject$ = “My Subject – Monthly Reporty”
    Keyword$ = “monthly, letter”
    BillingCode$ = “123456-xx”
    Mode$ = “Fax”
    CoverPage$ = “C:Program FilesWinFaxCovercoverpagefile.cvp”
    CoverText$ = “This is the cover text.”

    ChanNum = DDEInitiate(“FAXMNG32”, “CONTROL”)
    DDEExecute ChanNum, “GoIdle”
    DDETerminate ChanNum

    ‘Create a new link with the TRANSMIT topic.
    ChanNum = DDEInitiate(“FAXMNG32”, “TRANSMIT”)

    ‘Start DDEPokes to control WinFax.
    DDEPoke ChanNum, “sendfax”, “recipient(” + Chr$(34) + “555-1212” + Chr$(34) + “,” + Chr$(34) + “12:00:00” + Chr$(34) + “,” + Chr$(34) + “06/24/02” + Chr$(34) + “,” + Chr$(34) + FaxName + Chr$(34) + “,” + Chr$(34) + “F. B. Marketing Co.” + Chr$(34) + “,” + Chr$(34) + “Sales” + Chr$(34) + “,” + Chr$(34) + “Sales” + Chr$(34) + “,” + Chr$(34) + “Billing Code 08” + Chr$(34) + “,” + Chr$(34) + “Fax” + Chr$(34) + “)”

    ‘setcoverpage
    DDEPoke ChanNum, “sendfax”, “setcoverpage(” + Chr$(34) + CoverPage + Chr$(34) + “)”

    ‘fillcoverpage
    DDEPoke ChanNum, “sendfax”, “fillcoverpage(” + Chr$(34) + “Please send comments by Friday noon.” + Chr$(34) + “)”

    ‘attach
    ‘DDEPoke ChanNum, “sendfax”, “attach(” + Chr$(34) + “C:attachment.???” + Chr$(34) + “)”

    ‘showsendscreen
    DDEPoke ChanNum, “sendfax”, “showsendscreen(” + Chr$(34) + “0” + Chr$(34) + “)”

    ‘resolution
    DDEPoke ChanNum, “sendfax”, “resolution(” + Chr$(34) + “HIGH” + Chr$(34) + “)”

    ‘Tell WinFax to send the fax.

    ‘The SendfaxUI parameter is used only
    ‘when a fax-ready cover page and/or
    ‘attachments are included and you do
    ‘not need to print to the WinFax printer
    ‘driver.

    DDEPoke ChanNum, “sendfax”, “SendFaxUI”
    DDETerminate ChanNum
    ChanNum = DDEInitiate(“FAXMNG32”, “CONTROL”)
    DDEExecute ChanNum, “GoActive”

    ‘Close the link between the applications.

    DDETerminate ChanNum

    End Sub

    #4417

    JohnD
    Participant

    You should not use the SendFaxUI option, as this is not required if you are printing to the WinFax driver.
    You need to switch the printer driver to WinFax, and then print your report. When done, switch the printer back to the original printer driver.

    #4418

    Anonymous
    Member

    You should not use the SendFaxUI option, as this is not required if you are printing to the WinFax driver.
    You need to switch the printer driver to WinFax, and then print your report. When done, switch the printer back to the original printer driver.

    OK. How do I not use the SendFaxUI option? Please, stop laughing.

    DDEPoke ChanNum, “sendfax”, “SendFaxUI”
    DDETerminate ChanNum
    ChanNum = DDEInitiate(“FAXMNG32”, “CONTROL”)
    DDEExecute ChanNum, “GoActive”

    When I just take out “SendFaxUI” I get an error message. Do I take out the whole line? Then it doesn’t seem that the macro works. When you say switch the printer drive to Winfax, do you mean w/in the code, or within the page setup of the report before I start running the code?

    #4419

    JohnD
    Participant

    remove the sendfaxui code, in its place you need to do two things.

    1. set winfax as the current printer driver.
    2. print your report.

    Hope this helps

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.