?
Solved

SEND FAX USING VB6

Posted on 2009-02-16
12
Medium Priority
?
899 Views
Last Modified: 2012-05-06

Hello Experts.

Here is the scenario: I have an winXP pc, we have a telephone with a fax machine. There is no such connection with my pc and and fax machine.
fax machine number is 4111601.

Now here is my question, is there a way i could send a fax to that fax machine using my vb program? do i need any ocx or other files to do it?
and here is i think the hardest part for me, using that fax machine i wanted to send fax to other fax machine inside our company, lets say for example the number of that fax machine is 4222111.

I really stack with it.
I do really need your help experts..

Thank you very much in advance..

0
Comment
Question by:game-master
  • 6
  • 3
  • 2
  • +1
12 Comments
 
LVL 20

Expert Comment

by:hes
ID: 23656436
<<There is no such connection with my pc and and fax machine.>>
Then you can't

You need a phone connection on your PC to send a FAX
0
 
LVL 1

Accepted Solution

by:
sanginfotech earned 1500 total points
ID: 23657006
U'll need to install and configure Microsoft Fax. Check this link for more help http://support.microsoft.com/kb/152196#appliesto
Once done with this use the following code to send fax using outlook.


Private Sub SendFax()
On Error GoTo Err_Handler
    Dim objApplication As New Outlook.Application
    Dim objFax As MailItem
    Set objFax = objApplication.CreateItem(olMailItem)
    With objFax
        .Subject = "Some Test Subject"
        .Body = "Some Test Body"
        .To = "[Fax: +912230405080]"
        .Send
    End With
    Exit Sub
Err_Handler:
    MsgBox ("Error In Sending fax " & Err.Description)
End Sub

Open in new window

0
 
LVL 13

Author Comment

by:game-master
ID: 23665745


hes,
i know that there's no connection, that is why im asking experts like you, if there's a way how can
i able to connect those to 2 devices...if you have bright idea, i really need that one...

thank you...


sangin,
i tried your code, it gives me an error on the send part... "OUTLOOK DOES NOT RECOGNIZE ONE OR MORE NAMES."
what does it mean?
thanks


game-master



0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Expert Comment

by:JackOfPH
ID: 23666196
Sungit!!!
0
 
LVL 13

Author Comment

by:game-master
ID: 23677720


guys,

dont want any challenge for this question??


0
 
LVL 1

Expert Comment

by:sanginfotech
ID: 23678538
Hey game!
as far as the error u r getting check this one out.
http://support.microsoft.com/kb/823662
U'll need to have a dial up line (phone line) setup on ur machine. It's not required that a fax machine has to be connected to ur machine but a dial up line is required. Once u do that u'll need to install and configure Microsoft Fax. Then the code that i had posted before should work for u. Let me know if u need any help in setting up phone line and microsoft fax. Lets do it one step at a time.
Cheers,

Strider.
0
 
LVL 1

Expert Comment

by:sanginfotech
ID: 23678597
Check this one out! How to configure fax service on windows XP
http://support.microsoft.com/kb/306550
0
 
LVL 13

Author Comment

by:game-master
ID: 23679495


i try this code...

Dim FaxServer As Object
    Dim FaxDoc As Object

    'Create FaxServer object...
    Set FaxServer = CreateObject("FaxServer.FaxServer")
    '...and connect to it - no empty name allowed
    FaxServer.Connect ("mycomputer")
    'Create document
    Set FaxDoc = FaxServer.CreateDocument("d:\documents\mydoc.doc")
   
    FaxDoc.FaxNumber = "+99 (99) 999999"
    FaxDoc.RecipientName = "John Doe"
    FaxDoc.Send
     
    Set FaxDoc = Nothing
   
    FaxServer.Disconnect
   
    Set FaxServer = Nothing


I GOT AN ERROR ON THE SEND PART.. "Method Send of object IFaxDoc Failed" ....Invalid handle...

what is the error?
Please help...


game-master
0
 
LVL 13

Author Comment

by:game-master
ID: 23679586


sangin

thank you for your very warm help...

how i set up the phone line and microsoft fax
0
 
LVL 20

Expert Comment

by:hes
ID: 23680733
Gosh,
I seem to remember saying you need a phone connection on the pc you want to send a fax from.
0
 
LVL 13

Author Comment

by:game-master
ID: 23687411


i already have a phone connection on my PC...
0
 
LVL 13

Author Comment

by:game-master
ID: 23729673


guys,

i can send fax now, but i need to know how can i determine if the fax already sent? if line is busy? if sending fax failed?
is there any boolean property on the faxServer?

im asking this i need to send fax to multiple recipient (fax number) and each recipient have different attachment...
I really need your help guys...

Thanks in advance!

Game-Master
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

840 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