Sending Fax from a VB6 application 
Author Message
 Sending Fax from a VB6 application

How do I send a RTF document (its a report) to a user through fax from my
VB6 application. I've already managed to send it as an e-mail attachment
from the same application.

Any hints, sample code, URLs will be appreciated.
Lawrence.



Mon, 14 Jan 2002 03:00:00 GMT  
 Sending Fax from a VB6 application
How about using the RichTextcontrol to load up the RTF document then use the
Richtextcontrol.SelPrint to print out the document. Many fax drivers install
as printers, so to fax a document you just print it with the Fax set as your
default printer!


Quote:

> How do I send a RTF document (its a report) to a user through fax from my
> VB6 application. I've already managed to send it as an e-mail attachment
> from the same application.

> Any hints, sample code, URLs will be appreciated.
> Lawrence.



Wed, 16 Jan 2002 03:00:00 GMT  
 Sending Fax from a VB6 application
Hello Lawrence

Have you considered writing a simple VB fax program that would use an
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 page 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
page 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:
======================================VB




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

(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

Quote:
} 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.

Quote:
}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];    // 97(31)--Reserved for Intel use
Quote:
}FTR;     // FILE TRANSFER RECORD structure

===============================

Quote:

>How do I send a RTF document (its a report) to a user through fax from my
>VB6 application. I've already managed to send it as an e-mail attachment
>from the same application.
>Any hints, sample code, URLs will be appreciated.
>Lawrence.

         Kind Regards,
         Jon Krahmer, ElectraSoft

 Get newest version of [FaxMail for Windows], [FaxMail Network for Windows]
 or [32bit
...

read more »



Thu, 24 Jan 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Sending a Fax out of a VB6 Application?

2. How can I send FAX using VB Application?

3. How can I send FAX using VB Application?

4. Sending a fax from a VB Application?

5. sending fax from a VB application

6. How to send FAX from a VB application ?

7. How to send a fax from VB6 code using MAPIMessages/MAPISession

8. How to send a Fax with VB6

9. I need to know how to send faxes with VB6

10. I need to know how to send faxes with VB6

11. I need to know how to send faxes with VB6

12. utilize microsoft fax to automatically send faxes from access

 

 
Powered by phpBB® Forum Software