Solved

Faxing application

Posted on 2004-04-23
7
262 Views
Last Modified: 2008-03-04
Can somebody give me code example on how to create a faxing application.
such as : fax wizard that appear on the windows????
0
Comment
Question by:rickson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
7 Comments
 
LVL 5

Accepted Solution

by:
amit1978 earned 125 total points
ID: 10897995
This is sending fax manualy with the help of MSComm control and telephone line connected to your phone :

Hope this will solve ur problem.

Amit Jain
~~~~~~~~~~~~~~~~~~~~~~~
Private Sub Faxsend() **name of function
Dim i As Integer
Dim a As Byte
Dim pfad As String
Dim dialstring As String
'setting the mscommm port setttings.
MSComm1.CommPort = 1
MSComm1.PortOpen = True
If Err Then
  MsgBox "COM Port not available"
  Exit Sub
End If
'setting the baud rates.
MSComm1.Settings = "19200,N,8,1"
MSComm1.InputLen = 0
MSComm1.InBufferCount = 0
'variuos AT modem commands are used to send to the modem
'modem reset
MSComm1.Output = "ATZ" + vbCr
If wait("OK") = False Then Exit Sub

'setting the fax class=2.0
MSComm1.Output = "AT+FCLASS=2.0" + vbCr
If wait("OK") = False Then Exit Sub

'local id .
MSComm1.Output = "AT+FLI=" + Chr$(34) + "303" + Chr$(34) + vbCr
If wait("OK") = False Then Exit Sub

'command for Intitialize the fax parameters
MSComm1.Output = "AT+FIP" + vbCr
If wait("OK") = False Then Exit Sub

'entering the number fomr the user
Number = InputBox("Enter phone number:", "05524772")

'dialing the number using ATDT command
dialstring = "ATDT" + Number + ";" + Chr$(13)

MSComm1.Output = dialstring
If wait("OK") = False Then Exit Sub

'controls the mode that modem will act as datamodem.
MSComm1.Output = "AT+FAA=1" + vbCr
If wait("OK") = False Then Exit Sub


'MSComm1.Output = "AT+FDM" + vbCr
'If wait("OK") = False Then Exit Sub

'FLO command selects the method of flow control XON/XOFF=1
MSComm1.Output = "AT+FLO=1" + vbCr
If wait("OK") = False Then Exit Sub

''document to poll
'MSComm1.Output = "AT+FTP=1" + vbCr
'If wait("OK") = False Then Exit Sub
MSComm1.Output = "AT+FCO" + vbCr
If wait("OK") = False Then Exit Sub

'command for data transfer from modem ...
MSComm1.Output = "AT+FDT"    'init fax data sending
If wait("Connect") = False Then Exit Sub

i = FreeFile
Open "c:\windows\desktop\myfax\fax.txt" For Binary Access Read As #i
Do While Not (UCase(Right$(pfad, 4) = ".txt"))
  Get #1, , a               'skip header line
  pfad = pfad + Chr$(a)
Loop
Do While Not (EOF(i))
  Get #i, , a               'get byte from fax file
  If MSComm1.InBufferCount > 0 Then
    If MSComm1.Input = Chr$(24) Then    'wait for OK if cancel from modem
      If wait("OK") = False Then Exit Sub
    End If
  End If
  MSComm1.Output = Chr$(a)      'send byte to modem
Loop
     'Dim FileName
        'FileName = CommonDialog1.FileName
     'If FileName <> "" Then
      '   Open FileName For Binary Access Read Lock Read As #1
         'Open FileName For Random As #1

'         Dim tmpbuffer As Variant
 '        tmpbuffer = Input(LOF(1), 1)
   'MSComm1.OutBufferSize = Len(tmpbuffer)
    'MSComm1.Output = tmpbuffer

MSComm1.Output = Chr$(16) + Chr$(3) 'terminate sending fax data
If wait("OK") = False Then Exit Sub
MSComm1.Output = "AT+FET=2" + vbCr
If wait("OK") = False Then Exit Sub
MSComm1.PortOpen = False    '    ,close line
End Sub
~~~~~~~~~~~~~~~~~~~~~~~~`
0
 
LVL 4

Author Comment

by:rickson
ID: 10938755
thanks, will try it out. give me couple of days.....
regards,
ed
0
 
LVL 4

Author Comment

by:rickson
ID: 11074736
thank for the source, but can u give me details about all the FAX command???? is ot all the same???
eg:
'setting the fax class=2.0
MSComm1.Output = "AT+FCLASS=2.0" + vbCr




0
 
LVL 4

Author Comment

by:rickson
ID: 11257765
i think split the points can be fair enough. the problem is, I can't see any function on the page that allow me to split points.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question