Solved

Faxing application

Posted on 2004-04-23
7
259 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MsgBox 2 64
MS Access Search and Replace Using VBA 6 104
How to read File Date Created using VB6 8 70
VBA Replace Function - What am I missing? 3 45
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

740 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