Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Re: faxing with VB6 and windows 2000


Message #1 by "Luis A Gomez" <lgomez_19@y...> on Mon, 10 Mar 2003 14:38:11
Hi Luis,

The code that works for me since 2 months is:


Private Sub mnu_offertefaxen_Click()
    Dim faxserver As Object
    Dim faxdoc As Object
    Dim offertenummer As Long
    Dim Naarfaxnummer As String
    Dim MijnExportBestand As ActiveReportsTIFFExport.TIFFExport

    offertenummer = 8888
    Naarfaxnummer = "0104158312"
    
    Set MijnExportBestand =  
CreateObject "ActiveReportsTIFFExport.TIFFExport")
    MijnExportBestand.FileName = App.Path & "\Offerte " & offertenummer 
& ".tiff"
    
    SQL$ = ""
    SQL$ = "SELECT Offerte.*, Offerte_Detail.*, Debiteur.* "
    SQL$ = SQL$ & "FROM (Debiteur INNER JOIN offerte ON Debiteur.ID = 
offerte.Debiteur_ID) INNER JOIN offerte_Detail ON offerte.ID = 
offerte_Detail.offerte_ID "
    SQL$ = SQL$ & "WHERE (((Offerte.ID) = " & offertenummer & "))"
    
    FaxOffertebon.DAODataControl1.RecordSource = SQL$
    FaxOffertebon.Run False                         'rapport opbouwen 
zonder te zien
    MijnExportBestand.FaxExport FaxOffertebon.Pages    'rapport exporteren 
naar schijf
    Unload FaxOffertebon.Object
    Set FaxOffertebon = Nothing
    Set MijnExportBestand = Nothing
    
    Set faxserver = CreateObject("faxserver.faxserver")
    faxserver.Connect (".")
    Set faxdoc = faxserver.createdocument(App.Path & "\Offerte " & 
offertenummer & ".tiff")             'document must be present
    faxdoc.faxnumber = Naarfaxnummer
    faxdoc.Send

    Unload Me
    
End Sub





> Hi, Rini. My name is Luis A. Gomez. I am having the same problem you had 
s> ome time ago. I was wondering if you found the solution to this issue, 
a> nd if you could please help me to solve it.

> Thanks in advance,

> Luis A. Gomez

> 

> > This code for sending a document by fax worked for just 
o> > ne day. The next day it didn't work anymore for some 
r> > eason. 
D> > oes anyone has any idea why this code isn't working 
a> > nymore, perhaps some setting(s) in windows 2000?

> > Thanks in advance

> > Rini

> > Private Sub Command1_Click()

> >     Dim faxserver As Object
 > >    Dim faxdoc As Object

> >     Set faxserver = CreateObject("faxserver.faxserver")
 > >    
 > >    faxserver.Connect ("RINI")
 > >    
 > >    Set faxdoc = faxserver.CreateDocument
(> > "c:\vbhoofdmenu\test.doc")

> >     faxdoc.FaxNumber = "0104158312"
 > >    
 > >    faxdoc.recipientname = "P. Smits"
 > >    
 > >    faxdoc.Send
 > >    
 > >    faxserver.Disconnect

> >     Set faxdoc = Nothing
 > >    Set faxserver = Nothing
 > >       
E> > nd Sub

  Return to Index