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

Faxing with looping VBA code

Status
Not open for further replies.

MDJ52

MIS
Mar 30, 2001
120
0
0
US
I am currently sending out 200 to 300 faxes a day based on the code below. It searches my access table via a query and then use data from that query to loop through the code below. I have to set my default printer to WINFAX, but we have had great success with this module whether it is doing a mass send or just sending one fax based on a button on a PO form in our software. There is other code that surrounds this code that accesses the query and sets up fields for the send.
My problem is with our new server. We have set up a server with Windows2000 server on it. This server runs remote desktop so that users on the road can access databases, software, and send and receive PO's. Symantec/WINFAX admit, on their website, that the WINFAX Pro software is not compatible with WIN2000 server. There are no plans to make it compatible. I can run my module, and it states that the DDEINITIATE statement is invalid.
Is anyone aware of code for another fax product that would allow me to run it on WIN2000 server for sending single or mass faxes at the push of a button?

Thanks for any help or advise
Mike

************sample code******************
Select Case FaxArea
Case "500"
Select Case FaxPrefix
Case "202", "203", "206", "214", "215", "228"
Faxnbr = FaxPrefix & FaxSuffix
Case Else
Faxnbr = "1" & FaxArea & FaxPrefix & FaxSuffix
End Select
Case Else
Faxnbr = "1" & FaxArea & FaxPrefix & FaxSuffix
End Select
' Startup WinFax Pro
On Error Resume Next
'Establish fax link if WinFax Pro already Running
Chan = DDEInitiate("faxmng32", "Transmit")
'If error occurs, Winfax insn't running.
If Err Then
'So start WinFax Pro
I = Shell("C:\Program Files\Winfax\faxmng32.EXE", 6)
On Error GoTo 0
Chan = DDEInitiate("faxmng32", "Transmit") 'Establish Fax Link
End If
'Tell WinFax who this fax is going to
DoEvents
DDEPoke Chan, "sendfax", "recipient(" & Chr(34) & Faxnbr & Chr(34) & "," & Chr(34) & sdtime & Chr(34) & "," & Chr(34) & sddate & Chr(34) & "," & Chr(34) & Contact & Chr(34) & "," & Chr(34) & Company & Chr(34) & "," & Chr(34) & Subject & Chr(34) & "," & Chr(34) & Cage & Chr(34) & ",,,)"
DoEvents
DoCmd.OpenReport "rptQuote"
DoEvents
DDETerminateAll ' Terminate all links
pausetime = 3
start = Timer
Do While Timer < start + pausetime
DoEvents
Loop
**************end sample********************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top