Fax Software

Community Forums

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2659
    Anonymous
    Member

    I am now right at the last fence in what has been an “interesting” assignment!

    I have found the following excellent code on your forum, the problem is that the documemnt appears in a “preview” kind of pane, I just want it to go ahead and send! Everything else works fine

    Public Function SendFax()

    ‘On Error GoTo ErrorHandler

    Dim strRecipient As String
    Dim strFax As String
    Dim strattach As String

    ‘Test for required fields
    strFax = Forms!frmFinanceProposal!Text1077
    If strFax = “” Then
    MsgBox “Please enter a fax number”
    GoTo ErrorHandlerExit
    End If

    Debug.Print “Fax: ” & strFax

    strattach = “C:InboundFaxesFax.snp”
    Debug.Print “Attachment: ” & strattach

    ‘Start DDE connection to WinFax.
    ‘Create the link and disable automatic reception in WinFax
    lngChannel = DDEInitiate(Application:=”FAXMNG32″, topic:=”CONTROL”)
    DDEExecute ChanNum:=lngChannel, Command:=”GoIdle”
    DDETerminate ChanNum:=lngChannel

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

    ‘Start DDEPokes to control WinFax.
    strRecipient = “recipient(” & Chr$(34) & strFax & Chr$(34) & “)”
    Debug.Print “Recipient string: ” & strRecipient
    Debug.Print “Length of recipient string: ” & Len(strRecipient)
    DDEPoke ChanNum:=lngChannel, Item:=”sendfax”, Data:=strRecipient

    ‘Specify attach
    DDEPoke ChanNum:=lngChannel, Item:=”sendfax”, _
    Data:=”attach(” & Chr$(34) _
    & strattach & Chr$(34) & “)”

    ‘Show send screen
    DDEPoke ChanNum:=lngChannel, Item:=”sendfax”, _
    Data:=”showsendscreen(” & Chr$(34) _
    & “0” & Chr$(34) & “)”

    ‘Set resolution
    DDEPoke ChanNum:=lngChannel, Item:=”sendfax”, _
    Data:=”resolution(” & Chr$(34) _
    & “LOW” & Chr$(34) & “)”

    ‘Dim prtLoop As Printer

    ‘For Each prtLoop In Application.Printers
    ‘ With prtLoop
    ‘MsgBox “Device name: ” & .DeviceName & vbCr _
    ‘ & “Driver name: ” & .DriverName & vbCr _
    ‘ & “Port: ” & .Port
    ‘End With
    ‘Next prtLoop

    ‘ code to switch the printer driver to winfax “WinFax on FaxModem” goes here
    ‘Dim prtDefault As Printer

    ‘Set Application.Printer = Application.Printers(0)

    ‘Set prtDefault = Application.Printer

    ‘Send the fax
    DDEPoke ChanNum:=lngChannel, Item:=”sendfax”, Data:=”SendfaxUI”
    DDETerminate ChanNum:=lngChannel
    lngChannel = DDEInitiate(Application:=”FAXMNG32″, topic:=”CONTROL”)
    DDEExecute ChanNum:=lngChannel, Command:=”GoActive”
    DDETerminate ChanNum:=lngChannel

    lngChannel = DDEInitiate(Application:=”FAXMNG32″, topic:=”CONTROL”)
    DDEExecute ChanNum:=lngChannel, Command:=”GoActive”
    DDETerminate ChanNum:=lngChannel

    ‘*************NEED A COMMAND HERE TO GO AHEAD AND PERFORM THE SEND!

    ErrorHandlerExit:
    ‘DoCmd.Close objecttype:=acForm, objectname:=Me.Name
    Exit Function

    ErrorHandler:
    MsgBox “Error No: ” & Err.Number & “; Description: ” & _
    Err.Description
    Resume ErrorHandlerExit

    End Function

    #4511
    Anonymous
    Member

    If you have this problem then you need to do this
    In the Registry Editor (RegEdit), locate and select the following key. HKEY_CURRENT_USERSoftwareDelrinaWinFax7.0General

    Double-click the PreviewFax entry.
    Change the value to N and click OK.
    Exit and restart WinFax.

    This entry is not used in WinFax PRO 9,10 and seems to be a left over from 8.0 days. Likely you find that this problem is on a machine that was upgraded with an older version of WinFax.

    #4512
    Anonymous
    Member

    tnx for the reply, my registry does not contain this key at all! Any further suggestions?

    #4513
    Anonymous
    Member

    @Andy Shuter wrote:

    tnx for the reply, my registry does not contain this key at all! Any further suggestions?

    Turn off Preview Fax in WinFax setup?

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.