Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Khurram Khan Khan
  Where is Khurram Khan Khan?
 Karachi
 Pakistan
 Khurram Khan Khan
 To: Marat Chariev
  Where is Marat Chariev?
 Montreal
 Canada
 Marat Chariev
 Tags
Subject: Error on 2nd line
Thread ID: 6634 Message ID: 53395 # Views: 4 # Ratings: 0
Version: Unknown Category: Active X Controls & OLE Automation
Date: Tuesday, October 12, 2004 11:30:02 AM         
   


> Problem is SOLVED !
> Here is VFP code that works fine:
> ******************************************************************************************************************
> SET OLEOBJECT ON
>
> loFaxServer = CreateObject("FaxServer.FaxServer")
> loFaxServer.Connect('') && It will use local Fax Server
> loFaxDoc = loFaxServer.CreateDocument("C:\fax\fax.txt")
> loFaxDoc.FaxNumber = "+1 (450) 2663985"
> loFaxDoc.RecipientName = "Marat Chariev"
> loFaxDoc.Send()
>
> loFaxDoc = .NULL.
> loFaxServer.Disconnect()
> loFaxServer = .NULL.
>
> ******************************************************************************************************************
> VB code will work also if instead:
> > FaxServer.Connect ("\\mycomputer")
> will be used:
> FaxServer.Connect ("")
> * In VB you have to use double " not single ' , VFP doesn't care about it
>
>
>
>
> > This is code that suppose to work, but ....
> > Whit minor changes it can be used in VFP.
> > (Hint: in oder to use fxscomex.dll in you VFP program you should include code line - SET OLEOBJECT ON )
> >
> > Sub SendDocByFax()
> >
> > Dim FaxServer As Object
> > Dim FaxDoc As Object
> >
> > 'Create FaxServer object...
> > Set FaxServer = CreateObject("FaxServer.FaxServer")
> > '...and connect to it - no empty name allowed, should be name of your PC or any PC that you gona use to send a fax
> > FaxServer.Connect ("\\mycomputer")
> > 'Create document
> > Set FaxDoc = FaxServer.CreateDocument("c:\documents\mydoc.doc")
> >
> > FaxDoc.FaxNumber = "+99 (99) 999999"
> > FaxDoc.RecipientName = "John Doe"
> >
> > 'Here I'v got stuck...
> > FaxDoc.Send
> >
> > Set FaxDoc = Nothing
> >
> > FaxServer.Disconnect
> >
> > Set FaxServer = Nothing
> > End Sub
> >
> > *This example I got from MSDN articale:
> > "Fax Services: Send Any Printable File From Your Program in Windows 2000"
> > Marcin Kaluza
> >
> > Good luck
> >
> >
> > > > My customer doesn't want to have a deal with any external programs. He just want to press button once to send fax and that's it that's all
> > > > I did same code in VB (just for test perpouse), but when I call .Send method it pops up error :(
> > >
> > > If you can post the VB code we can try to help with translating it to VFP and maybe fix the error.
> > >
> > > --
> > > Eric den Doop
> > > www.foxite.com - The Home Of The Visual FoxPro Experts


I put this code in program file and run
but after few second the error message appear on second line

loFaxServer.Connect('') && It will use local Fax Server
message = " OLE error code 0x80004005: Unspecified error. "
and I m from pakistan(Karachi) please advise me the about the format of fax no.

country code = 92
city code = 021
fax number = 4549605

Thanks
KHurram KhAn



ENTIRE THREAD

How can I send a fax from within a program Posted by Marat Chriev @ 1/16/2002 6:25:21 PM
RE: How can I send a fax from within a program Posted by Pete Sass @ 1/16/2002 8:47:50 PM
RE: How can I send a fax from within a program Posted by Marat Chariev @ 1/16/2002 9:19:27 PM
RE: How can I send a fax from within a program Posted by Eric den Doop @ 1/16/2002 9:21:12 PM
RE: How can I send a fax from within a program Posted by Marat Chariev @ 1/17/2002 3:43:10 PM
RE: How can I send a fax from within a program Posted by Marat Chariev @ 1/17/2002 5:55:51 PM
RE: How can I send a fax from within a program Posted by Eric den Doop @ 1/17/2002 8:35:33 PM
Error on 2nd line Posted by Khurram Khan Khan @ 10/12/2004 11:30:02 AM