I am aware of the WinFax SDK Manual, and have read it and tried to get it to
work but without any success. I even had a look at the VB code samples, but
could not make very much sense of it.
I want to send a report to a specific customer with info relevant to
customer by fax via winfax.
Have a table with customer fax no, etc from which I will get the number to
send fax to.
Is there anyone out there who has an example of a basic prg just to send a
basic VFP report via Winfax that they can send me. All I need is just
something to get me on the right track!!!
Thanking you very much for any help.
Cole
Henri Visser <he...@vfoxpro.co.uk> wrote in message
news:7stcos$bcg$1...@gxsn.com...
For anyone else out there who need a helping hand with this matter, here is
the basic code needed to send a fax with Winfax from VFP:
(no error checking, etc included here. just the bare-bones structure.
RELEASE ALL EXTENDED
SET PRINTER TO NAME WINFAX && Set Default Printer to WinFax
oWFXSend=CREATEOBJECT("winfax.sdksend8.0") && Create an instance
of WinFax
oWFXSend.LeaveRunning
oWFXAttach=oWFXSend.AddAttachmentFile('') && Create attachment
file
oWFXSend.setprintfromapp(1) && Lets WinFax know you will be
printing from VFP
oWFXSend.setto('RECIPIENT NAME') && Set Recipient Name
oWFXSend.setnumber('11111-111111') && Set Tel Number
oWFXSend.addrecipient && Add Recipient
oWFXSend.SEND(1)
REPORT FORM c:\vfpreport.frx TO PRINT FOR criteria... && Print VFP
report
Cole <col...@worldnet.att.net> wrote in message
news:7t0fq1$r3p$1...@bgtnsc01.worldnet.att.net...
Have you considered writing a simple fax SUB that would use a fax API
(Application Programmable Interface). This API will allow WYSIWYG
(What You See Is What You Get) when you fax.
Have you considered writing a simple fax program that would use an API
(Application Programmable Interface).
You can write a simple Visual Basic fax program that uses the
ElectraSoft fax API (Application Programmable Interface).
For example:
c>I need a fax program that runs in the background and will let
c>me send without having to pick a phone number. I want to pass
c>it the number.
Go to www.ElectraSoft.com and try their fax API that you can try for
free, including some VB source code.
---
Here is a fax solution including some VB source code.
---
If you want to use ElectraSoft's fax API to send directly from your
own program, read [Item 3] of the ElectraSoft Manual to learn how to
send a fax directly from your program by passing it the name and fax
number. This Manual is included with ElectraSoft's fax software. Read
[Item 61] to learn how to send a fax to a list of fax numbers.
You can also print directly to ElectraSoft's [Convert to Fax].
If you can print, you can fax.
All the Fax Machines in the world are your printers with ElectraSoft's
fax programs.
-------
Code example:
TOP:
o Put the SEND2FAX.DEL file
o Print document to: ElectraSoft's Convert to Fax
o Wait for SEND2FAX.DEL to disappear
o If done EXIT else back to TOP
EXIT:
X-From_: mwa...@luminet.net Fri Feb 13 12:53:43 1998
Return-Path: mwa...@luminet.net
From: Michael Walter <mwa...@luminet.net>
To: "'Fax...@ElectraSoft.com'" <Fax...@ElectraSoft.com>
Subject: VB Code to batch send faxes
Date: Fri, 13 Feb 1998 12:58:06 -0600
Thanks for your help. I hope this will be of interest to you or your
customers.
Michael Walter
mwa...@luminet.net
(507) 454-3830
"Nenio superas similia troajxo"
Case "Newfax"
'Send Faxes to Customers
'Assumes that 32BF Convert to Fax is already selected
'as the default printer
frmProduction.lblmessage.Caption = "Converting and sending Fax
Files..."
frmProduction.lblmessage.Refresh
Dim myfile As String
Dim printline As String
Dim SRCFILE As String
Dim DESFILE As String
Dim MYCHAR As String * 1
For x = 1 To 50
SRCFILE = "Z:\FAXES\FAX" & x & ".TMP"
myfile = Dir(SRCFILE)
If myfile <> "" Then
'found a fax so copy correct DEL file
FileCopy "Z:\BatchFiles\FaxBatch" & x & ".txt",
"C:\32BITFAX\SEND2FAX.DEL"
'NOW CONVERT TO FAX FORMAT
Open SRCFILE For Input As #1
Do While Not EOF(1)
MYCHAR = Input(1, #1)
If MYCHAR <> Chr(13) And MYCHAR <> Chr(10) Then
printline = printline & MYCHAR
Else
If printline <> "" Then 'because of chr(13)
and chr(10)
'code above, we will
be printing
'a blank line. In
effect double spacing.
'This will prevent
that.
Printer.Print printline
End If
printline = ""
End If
Loop
Close #1
Printer.EndDoc
Do
DESFILE = Dir("C:\32BITFAX\SEND2FAX.DEL")
' 'MUST KEEP LOOPING UNTIL THE SENDFAX
' 'FILE HAS BEEN DELETED
If DESFILE <> "" Then
Else
Exit Do
End If
Loop
End If
Next x
frmProduction.lblmessage.Caption = ""
frmProduction.lblmessage.Refresh
=====
CECS EcfFtr2Fh_EL;//Structure for ????????.LOG, ????????.SNW,
????????.SFT
// * CURRENT EVENT CONTROL structure: Output of the CAS function
// * CASGetCurrentEventStatus.
#pragma pack(1)
typedef struct
{
ECF ECF_2Fh; //EvtContFile; //ECB==Event Control file of
current event
FTR FTR_2Fh; //CurrentFileInTransit;//FTR==FILE TRANSFER RECORD
structure
} CECS;
//CECS FAR *lpCurEvtContStrut;
#pragma pack()
// * EVENT CONTROL FILE structure: The FIXED part of the CAS
specification
// * for a Control File. (The variable parts are the cover page text
and
// * the File Transfer Records.)...
// *
// * The path and name of a disk file consisting of this structure
plus
// * the cover page and the File Transfer Records is the input to the
CAS
// * function CASSubmitTask...
// *
// * This structure is also the output of the high-level Toolkit
function
// * CCPGetEventControlInfo...
// * The variable part is the cover page text. Append a buffer
containing
// * the cover page text to this structure, starting at the last
field.
#pragma pack(1)
typedef struct// OffSet\ /Length
{// | |
BYTE byEventType; // 0(1)---Type of event (send==0,
receive etc)
BYTE byTransferType; // 1(1)---0==200x200,1==100x200,2==File
transfer mode.
__int16 iStatOfEvt; // 2(2)---0==Successfully
Completed,1==Waiting...
WORD wSendTime; // 4(2)---Time to send,0==now.
WORD wSendDate; // 6(2)---Date to send,0==now.
__int16 iNumOfFiles; // 8(2)---Max is 32766
WORD wOffSetToFTR; // 10(2)---Offset to 1st FTR in TCF on
disk
char szPhoneNum[47]; // 12(47)--Num to call 118(47) ASCIIZ
char szApTag[51]; // 59(51)--Application specific tag field
char szCvrPageFile[13]; //110(13)--Cover Page FileName
12345678.CVR
BYTE byResved1; //123(1)---reserved,set to 0
BYTE byConnectSeconds; //124(1)---Time of connection: seconds
BYTE byConnectMinutes; //125(1)---Time of connection: minutes
BYTE byConnectHours; //126(1)---Time of connection: hours
LONGWORD dwTotalPages; //127(4)---Total # of pages in all files
LONGWORD dwPagesSent; //131(4)---# of pages transmitted so far
WORD wFilesSent; //135(2)---# of files transmitted so far
BYTE byCvrPageFg; //137(1)---1==Send, 0==don't send cover
page
WORD wErrorCount; //138(2)---Total # of tranmission errors
BYTE byDelFileFg; //140(1)---Del File after
Send>>0==No,1==if suc,2==Allways
WORD wEvntHandle; //141(2)---Assigned by CAS
char szResved2[31]; //143(31)*reserved,SetTo=0
char szSubject[21]; //174(21)
BYTE byConStatus; //195(1)---Reserved,set to 0
WORD wFatalError; //196(2)---Reserved,set to 0
char szSendFaxBook[9]; //198(9)
BYTE szResved3[1]; //207(1)
WORD wConcludedTime; //208(2)---Time Event Completed
WORD wConcludedDate; //210(2)---Date Event Completed
DWORD dwWorkStationNumber; //212(4)
BYTE byCvrPageReadFg; //216(1)---0==No,1==Yes
BYTE bySuppressPageHdr; //217(1)---FALSE==Page Header, TRUE==No
Page Header
char szRemoteCSID[21]; //218(21)--Remote CCITT identification
char szRecipient[32]; //239(32)--To: field
char szFaxFromName[32]; //271(32)--From: field
char szLogoFilePath[80]; //303(80)--Path to logo file that is sent
char szCvrTxt[CvrTxtSize]; //383(5200)--Marks start of the
Covertext,Ends with 0.
}ECF; // EVENT CONTROL FILE structure
// * FILE TRANSFER RECORD structure: One or more of these are a part
of
// * the CAS Control File. The path and name of this file is the
input to
// * the CAS function CASSubmitTask.
// *
// * One of these structures representing the file currently being
// * transferred is part of the output structure of the CAS function
// * CASGetCurrentEventStatus.
// *
// * A linked list of one or more structures containing this structure
is
// * the output of the high-level Toolkit function
CASGetEventFileInfo.
#pragma pack(1)
typedef struct// OffSet\ /Length, sizeof(FTR)==128
{// | |
BYTE byFileType; // 0(1)---Type of file
(0==ASCII,1==PCX,2==DCX)
BYTE byTextSize; // 1(1)---0==80colx66lin, 1==132colx88lin
BYTE byFileStatus; // 2(1)---Status of file (opened, moved
etc)
LONGWORD dwBytesSent; // 3(4)---Bytes transmitted so far
LONGWORD dwFileSize; // 7(4)---Size of file in bytes
WORD wPagesSent; // 11(2)---Pages transmitted so far
WORD wPageCount; // 13(2)---# of pages in this file
char szSourceFlNm[80]; // 15(80)--Path name of this file
BYTE byAddPageInc; // 95(1)---Additional 1/8 inch increments
char cPageLength; // 96(1)---Page length in inches,0==11in
char szRESERVED[31];
}FTR; // FILE TRANSFER RECORD structure
"Henri Visser" <he...@vfoxpro.co.uk> wrote:
>I have already sent this post in once before, but I did not quite get the
>response I was looking for.
>I am aware of the WinFax SDK Manual, and have read it and tried to get it to
>work but without any success. I even had a look at the VB code samples, but
>could not make very much sense of it.
>I want to send a report to a specific customer with info relevant to
>customer by fax via winfax.
>Have a table with customer fax no, etc from which I will get the number to
>send fax to.
>Is there anyone out there who has an example of a basic prg just to send a
>basic VFP report via Winfax that they can send me. All I need is just
>something to get me on the right track!!!
>Thanking you very much for any help.
Kind Regards,
Jon Krahmer, ElectraSoft
Get newest version of [FaxMail for Windows], [FaxMail Network for Windows]
or [32bit Fax], free trial: http://www.ElectraSoft.com/
To read what users are saying about ElectraSoft's fax software, go to
http://www.ElectraSoft.com/10GoodReasons/