Results 1 to 7 of 7

Thread: Sending a FAX

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    How do I send a fax through VB code.

    The data must also be generated by vb
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  2. #2
    Lively Member
    Join Date
    Jul 2000
    Posts
    72
    you should be able to set the modem/fax up as a printer object on the system itself. then by building a string and sending to the fax modem, after showing the printer selection screen and choosing the fax modem as output, it should send the fax.

    I have not tried this but have seen the fax modem listed as an output device. So this should be easy to accomplish. Sending to the printer is real easy. Need sample code for that let me know.

    VB 6 Professional Edition

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    Anything you can send me will help

    I have delt directly with the printer object but I don't know where to start when it comes to faxes




    Kurt Simons
    [I know I'm a hack but my clients don't!]

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Once you've selected the FAX: printer driver, it's the same as printing a normal page.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    Thanks I'll give it a try
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  6. #6
    Lively Member
    Join Date
    Jul 2000
    Posts
    72
    here is some simple code for setting up the printer

    'dlgprint is the common dialog control
    'rtfprint is the richtextbox control, thought you should ' be able to use a textbox control


    dlgPrint.Flags = cdlPDReturnDC + cdlPDNoPageNums
    If rtfPrint.SelLength = 0 Then
    dlgPrint.Flags = dlgPrint.Flags + cdlPDAllPages
    Else
    dlgPrint.Flags = dlgPrint.Flags + cdlPDSelection
    End If
    On Error Resume Next
    dlgPrint.CancelError = True
    dlgPrint.ShowPrinter

    ' this is if the user selects cancel on the printer ' screen
    If Err <> 32755 Then
    rtfPrint.SelPrint dlgPrint.hDC
    Printer.EndDoc
    Else
    MsgBox ("No Print out made")
    End If
    VB 6 Professional Edition

  7. #7
    Lively Member ac11965's Avatar
    Join Date
    May 2000
    Location
    East London, South Africa
    Posts
    69

    Question

    ok, how do i even start?
    i would like to send a fax from vb, but first i must
    send my data to a word document and then fax it from there?

    i tried the sendobject in access to send my report, but
    my report format does'nt get faxed. (all the lines and
    logos and stuff) and it first asks you for a default user or something like that - how do i answer ok to this from within vb?

    any other suggestions would be much appreciated!

    maybe right a macro in word that sends out the documents
    as soon as it receives it? but what if there's like
    3 documents? what about a template?

    thanks
    Adri

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width