[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

Re: Setting Up References in the VBE

NickHK

12/13/2006 2:15:00 AM

Albert,
Which component are you using ?

NickHK

"Albert" <Albert@discussions.microsoft.com> wrote in message
news:5EFF17B9-BC3E-4163-AC0B-6F2BF63E29DA@microsoft.com...
> Hello!
> I'm trying to send a FAX through VBA without getting the Send Fax Dialog
Box
> that asks for the number to dial, etc...
> I read on a previous thread that I had to set up a reference to the Fax
> software.
> I found a couple of libraries that had something to do with faxes.
> However, I'm swamped in trying to control them.
> I see some of the classes and members in the Object Explorer in VBE, but I
> can't get anything to work.
> Perhaps someone has done this?
> Help would be very much appreciated.
> Albert C


10 Answers

Albert

12/13/2006 4:31:00 AM

0

Hi NickHK.
I've tried these:
faxcom1.0 Type Library
FaxControl1.0 Type Library
Microsoft Fax Service Extended COM Type Library

I also tried to set up a reference to Windows/System32/WinFax.dll but I get
an error message.

Thanks in advance,
Albert C

"NickHK" wrote:

> Albert,
> Which component are you using ?
>
> NickHK
>
> "Albert" <Albert@discussions.microsoft.com> wrote in message
> news:5EFF17B9-BC3E-4163-AC0B-6F2BF63E29DA@microsoft.com...
> > Hello!
> > I'm trying to send a FAX through VBA without getting the Send Fax Dialog
> Box
> > that asks for the number to dial, etc...
> > I read on a previous thread that I had to set up a reference to the Fax
> > software.
> > I found a couple of libraries that had something to do with faxes.
> > However, I'm swamped in trying to control them.
> > I see some of the classes and members in the Object Explorer in VBE, but I
> > can't get anything to work.
> > Perhaps someone has done this?
> > Help would be very much appreciated.
> > Albert C
>
>
>

NickHK

12/13/2006 4:40:00 AM

0

Albert,
This should get you started ;
http://www.codeguru.com/forum/archive/index.php/t-2...

NickHK

"Albert" <Albert@discussions.microsoft.com> wrote in message
news:D36402EE-DDDA-4EC7-949E-B43BD6125B39@microsoft.com...
> Hi NickHK.
> I've tried these:
> faxcom1.0 Type Library
> FaxControl1.0 Type Library
> Microsoft Fax Service Extended COM Type Library
>
> I also tried to set up a reference to Windows/System32/WinFax.dll but I
get
> an error message.
>
> Thanks in advance,
> Albert C
>
> "NickHK" wrote:
>
> > Albert,
> > Which component are you using ?
> >
> > NickHK
> >
> > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > news:5EFF17B9-BC3E-4163-AC0B-6F2BF63E29DA@microsoft.com...
> > > Hello!
> > > I'm trying to send a FAX through VBA without getting the Send Fax
Dialog
> > Box
> > > that asks for the number to dial, etc...
> > > I read on a previous thread that I had to set up a reference to the
Fax
> > > software.
> > > I found a couple of libraries that had something to do with faxes.
> > > However, I'm swamped in trying to control them.
> > > I see some of the classes and members in the Object Explorer in VBE,
but I
> > > can't get anything to work.
> > > Perhaps someone has done this?
> > > Help would be very much appreciated.
> > > Albert C
> >
> >
> >


Albert

12/13/2006 5:32:00 AM

0

Thanks. Its a little bit confusing, but I'm starting to play with it to see
if I can get something out of it. No luck so far though. The code executes
well and I am no longer getting an error message, but the code doesn't seem
to do anything.
I added FaxDoc.Send at the end and I got a -2147024864 Error message.
I'm kind of new to this whole Reference thing.
Regards,
Albert C

"NickHK" wrote:

> Albert,
> This should get you started ;
> http://www.codeguru.com/forum/archive/index.php/t-2...
>
> NickHK
>
> "Albert" <Albert@discussions.microsoft.com> wrote in message
> news:D36402EE-DDDA-4EC7-949E-B43BD6125B39@microsoft.com...
> > Hi NickHK.
> > I've tried these:
> > faxcom1.0 Type Library
> > FaxControl1.0 Type Library
> > Microsoft Fax Service Extended COM Type Library
> >
> > I also tried to set up a reference to Windows/System32/WinFax.dll but I
> get
> > an error message.
> >
> > Thanks in advance,
> > Albert C
> >
> > "NickHK" wrote:
> >
> > > Albert,
> > > Which component are you using ?
> > >
> > > NickHK
> > >
> > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > news:5EFF17B9-BC3E-4163-AC0B-6F2BF63E29DA@microsoft.com...
> > > > Hello!
> > > > I'm trying to send a FAX through VBA without getting the Send Fax
> Dialog
> > > Box
> > > > that asks for the number to dial, etc...
> > > > I read on a previous thread that I had to set up a reference to the
> Fax
> > > > software.
> > > > I found a couple of libraries that had something to do with faxes.
> > > > However, I'm swamped in trying to control them.
> > > > I see some of the classes and members in the Object Explorer in VBE,
> but I
> > > > can't get anything to work.
> > > > Perhaps someone has done this?
> > > > Help would be very much appreciated.
> > > > Albert C
> > >
> > >
> > >
>
>
>

NickHK

12/13/2006 8:31:00 AM

0

Albert,
Using W2K, so can't tell you about other OSs.

First time I tried it, but this works, at least the sending fax and Fax
queue dialogs comes up, but then I cancel, as I don't have a number to send
a fax at the moment.
I assume you have a modem installed and it is able to send faxes.
I have Winfax installed, so I know my modem is OK.
Make sure you do not have the fax service disabled; Control Panel>Admin
Tools>Services>Fax Service, either Manual or Automatic.

Dim FaxServ As FAXCOMLib.FaxServer
Dim FaxDoc As FAXCOMLib.FaxDoc

Private Sub CommandButton1_Click()

Set FaxServ = New FAXCOMLib.FaxServer
FaxServ.Connect Environ("ComputerName")
Set FaxDoc = FaxServ.CreateDocument("C:\fax.tiff")

With FaxDoc
.Filename = "c:\test.txt"
.FaxNumber = "5555551212"
.Send
End With

End Sub

NickHK

"Albert" <Albert@discussions.microsoft.com> wrote in message
news:B302681F-9AA9-49DD-8E83-375E004A56EF@microsoft.com...
> Thanks. Its a little bit confusing, but I'm starting to play with it to
see
> if I can get something out of it. No luck so far though. The code executes
> well and I am no longer getting an error message, but the code doesn't
seem
> to do anything.
> I added FaxDoc.Send at the end and I got a -2147024864 Error message.
> I'm kind of new to this whole Reference thing.
> Regards,
> Albert C
>
> "NickHK" wrote:
>
> > Albert,
> > This should get you started ;
> > http://www.codeguru.com/forum/archive/index.php/t-2...
> >
> > NickHK
> >
> > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > news:D36402EE-DDDA-4EC7-949E-B43BD6125B39@microsoft.com...
> > > Hi NickHK.
> > > I've tried these:
> > > faxcom1.0 Type Library
> > > FaxControl1.0 Type Library
> > > Microsoft Fax Service Extended COM Type Library
> > >
> > > I also tried to set up a reference to Windows/System32/WinFax.dll but
I
> > get
> > > an error message.
> > >
> > > Thanks in advance,
> > > Albert C
> > >
> > > "NickHK" wrote:
> > >
> > > > Albert,
> > > > Which component are you using ?
> > > >
> > > > NickHK
> > > >
> > > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > > news:5EFF17B9-BC3E-4163-AC0B-6F2BF63E29DA@microsoft.com...
> > > > > Hello!
> > > > > I'm trying to send a FAX through VBA without getting the Send Fax
> > Dialog
> > > > Box
> > > > > that asks for the number to dial, etc...
> > > > > I read on a previous thread that I had to set up a reference to
the
> > Fax
> > > > > software.
> > > > > I found a couple of libraries that had something to do with faxes.
> > > > > However, I'm swamped in trying to control them.
> > > > > I see some of the classes and members in the Object Explorer in
VBE,
> > but I
> > > > > can't get anything to work.
> > > > > Perhaps someone has done this?
> > > > > Help would be very much appreciated.
> > > > > Albert C
> > > >
> > > >
> > > >
> >
> >
> >


Albert

12/13/2006 2:45:00 PM

0

Hi NickHK,
Thank you so much... That was very cool stuff and now it did work.
However, it only works if "c:\test.txt" exists. How would I go about sending
the PrintArea in my current workbook?
Thanks again and best regards,
Albert C

"NickHK" wrote:

> Albert,
> Using W2K, so can't tell you about other OSs.
>
> First time I tried it, but this works, at least the sending fax and Fax
> queue dialogs comes up, but then I cancel, as I don't have a number to send
> a fax at the moment.
> I assume you have a modem installed and it is able to send faxes.
> I have Winfax installed, so I know my modem is OK.
> Make sure you do not have the fax service disabled; Control Panel>Admin
> Tools>Services>Fax Service, either Manual or Automatic.
>
> Dim FaxServ As FAXCOMLib.FaxServer
> Dim FaxDoc As FAXCOMLib.FaxDoc
>
> Private Sub CommandButton1_Click()
>
> Set FaxServ = New FAXCOMLib.FaxServer
> FaxServ.Connect Environ("ComputerName")
> Set FaxDoc = FaxServ.CreateDocument("C:\fax.tiff")
>
> With FaxDoc
> .Filename = "c:\test.txt"
> .FaxNumber = "5555551212"
> .Send
> End With
>
> End Sub
>
> NickHK
>
> "Albert" <Albert@discussions.microsoft.com> wrote in message
> news:B302681F-9AA9-49DD-8E83-375E004A56EF@microsoft.com...
> > Thanks. Its a little bit confusing, but I'm starting to play with it to
> see
> > if I can get something out of it. No luck so far though. The code executes
> > well and I am no longer getting an error message, but the code doesn't
> seem
> > to do anything.
> > I added FaxDoc.Send at the end and I got a -2147024864 Error message.
> > I'm kind of new to this whole Reference thing.
> > Regards,
> > Albert C
> >
> > "NickHK" wrote:
> >
> > > Albert,
> > > This should get you started ;
> > > http://www.codeguru.com/forum/archive/index.php/t-2...
> > >
> > > NickHK
> > >
> > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > news:D36402EE-DDDA-4EC7-949E-B43BD6125B39@microsoft.com...
> > > > Hi NickHK.
> > > > I've tried these:
> > > > faxcom1.0 Type Library
> > > > FaxControl1.0 Type Library
> > > > Microsoft Fax Service Extended COM Type Library
> > > >
> > > > I also tried to set up a reference to Windows/System32/WinFax.dll but
> I
> > > get
> > > > an error message.
> > > >
> > > > Thanks in advance,
> > > > Albert C
> > > >
> > > > "NickHK" wrote:
> > > >
> > > > > Albert,
> > > > > Which component are you using ?
> > > > >
> > > > > NickHK
> > > > >
> > > > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > > > news:5EFF17B9-BC3E-4163-AC0B-6F2BF63E29DA@microsoft.com...
> > > > > > Hello!
> > > > > > I'm trying to send a FAX through VBA without getting the Send Fax
> > > Dialog
> > > > > Box
> > > > > > that asks for the number to dial, etc...
> > > > > > I read on a previous thread that I had to set up a reference to
> the
> > > Fax
> > > > > > software.
> > > > > > I found a couple of libraries that had something to do with faxes.
> > > > > > However, I'm swamped in trying to control them.
> > > > > > I see some of the classes and members in the Object Explorer in
> VBE,
> > > but I
> > > > > > can't get anything to work.
> > > > > > Perhaps someone has done this?
> > > > > > Help would be very much appreciated.
> > > > > > Albert C
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
>
>
>

NickHK

12/14/2006 2:14:00 AM

0

Albert,
If you do not want to use Print to a fax (like WinFax), then you would have
to save the range to a file first.
Here's one of the many that export a range to a graphics format ;
http://j-walk.com/ss/pup/pup6/fe...

Then fax that output.

NickHK

"Albert" <Albert@discussions.microsoft.com> wrote in message
news:D2A246E1-D745-4F2E-B045-78ED1E6C3B22@microsoft.com...
> Hi NickHK,
> Thank you so much... That was very cool stuff and now it did work.
> However, it only works if "c:\test.txt" exists. How would I go about
sending
> the PrintArea in my current workbook?
> Thanks again and best regards,
> Albert C
>
> "NickHK" wrote:
>
> > Albert,
> > Using W2K, so can't tell you about other OSs.
> >
> > First time I tried it, but this works, at least the sending fax and Fax
> > queue dialogs comes up, but then I cancel, as I don't have a number to
send
> > a fax at the moment.
> > I assume you have a modem installed and it is able to send faxes.
> > I have Winfax installed, so I know my modem is OK.
> > Make sure you do not have the fax service disabled; Control Panel>Admin
> > Tools>Services>Fax Service, either Manual or Automatic.
> >
> > Dim FaxServ As FAXCOMLib.FaxServer
> > Dim FaxDoc As FAXCOMLib.FaxDoc
> >
> > Private Sub CommandButton1_Click()
> >
> > Set FaxServ = New FAXCOMLib.FaxServer
> > FaxServ.Connect Environ("ComputerName")
> > Set FaxDoc = FaxServ.CreateDocument("C:\fax.tiff")
> >
> > With FaxDoc
> > .Filename = "c:\test.txt"
> > .FaxNumber = "5555551212"
> > .Send
> > End With
> >
> > End Sub
> >
> > NickHK
> >
> > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > news:B302681F-9AA9-49DD-8E83-375E004A56EF@microsoft.com...
> > > Thanks. Its a little bit confusing, but I'm starting to play with it
to
> > see
> > > if I can get something out of it. No luck so far though. The code
executes
> > > well and I am no longer getting an error message, but the code doesn't
> > seem
> > > to do anything.
> > > I added FaxDoc.Send at the end and I got a -2147024864 Error message.
> > > I'm kind of new to this whole Reference thing.
> > > Regards,
> > > Albert C
> > >
> > > "NickHK" wrote:
> > >
> > > > Albert,
> > > > This should get you started ;
> > > > http://www.codeguru.com/forum/archive/index.php/t-2...
> > > >
> > > > NickHK
> > > >
> > > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > > news:D36402EE-DDDA-4EC7-949E-B43BD6125B39@microsoft.com...
> > > > > Hi NickHK.
> > > > > I've tried these:
> > > > > faxcom1.0 Type Library
> > > > > FaxControl1.0 Type Library
> > > > > Microsoft Fax Service Extended COM Type Library
> > > > >
> > > > > I also tried to set up a reference to Windows/System32/WinFax.dll
but
> > I
> > > > get
> > > > > an error message.
> > > > >
> > > > > Thanks in advance,
> > > > > Albert C
> > > > >
> > > > > "NickHK" wrote:
> > > > >
> > > > > > Albert,
> > > > > > Which component are you using ?
> > > > > >
> > > > > > NickHK
> > > > > >
> > > > > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > > > > news:5EFF17B9-BC3E-4163-AC0B-6F2BF63E29DA@microsoft.com...
> > > > > > > Hello!
> > > > > > > I'm trying to send a FAX through VBA without getting the Send
Fax
> > > > Dialog
> > > > > > Box
> > > > > > > that asks for the number to dial, etc...
> > > > > > > I read on a previous thread that I had to set up a reference
to
> > the
> > > > Fax
> > > > > > > software.
> > > > > > > I found a couple of libraries that had something to do with
faxes.
> > > > > > > However, I'm swamped in trying to control them.
> > > > > > > I see some of the classes and members in the Object Explorer
in
> > VBE,
> > > > but I
> > > > > > > can't get anything to work.
> > > > > > > Perhaps someone has done this?
> > > > > > > Help would be very much appreciated.
> > > > > > > Albert C
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> >
> >
> >


Albert

12/17/2006 2:21:00 AM

0

Hi NickHK,
I finally nailed it quite nicely with PrintToFile=True
Do you know some way to get a list of the available printers?
Regards,
Albert C


Dim FaxServ As FAXCOMLib.FaxServer
Dim FaxDoc As FAXCOMLib.FaxDoc
Sub AutoFaxer()

Application.ActivePrinter = "Fax en Ne01:"
ActiveSheet.PrintOut , , , , , True, , ThisWorkbook.Path &
"\PrintToFileAlbert.tiff"

Set FaxServ = New FAXCOMLib.FaxServer
FaxServ.Connect Environ("AlbertoCattan")
Set FaxDoc = FaxServ.CreateDocument("C:\fax.tiff")

With FaxDoc
.Filename = ThisWorkbook.Path & "\PrintToFileAlbert.tiff"
.FaxNumber = "9,012345678"
.Send
End With

End Sub


"NickHK" wrote:

> Albert,
> If you do not want to use Print to a fax (like WinFax), then you would have
> to save the range to a file first.
> Here's one of the many that export a range to a graphics format ;
> http://j-walk.com/ss/pup/pup6/fe...
>
> Then fax that output.
>
> NickHK
>
> "Albert" <Albert@discussions.microsoft.com> wrote in message
> news:D2A246E1-D745-4F2E-B045-78ED1E6C3B22@microsoft.com...
> > Hi NickHK,
> > Thank you so much... That was very cool stuff and now it did work.
> > However, it only works if "c:\test.txt" exists. How would I go about
> sending
> > the PrintArea in my current workbook?
> > Thanks again and best regards,
> > Albert C
> >
> > "NickHK" wrote:
> >
> > > Albert,
> > > Using W2K, so can't tell you about other OSs.
> > >
> > > First time I tried it, but this works, at least the sending fax and Fax
> > > queue dialogs comes up, but then I cancel, as I don't have a number to
> send
> > > a fax at the moment.
> > > I assume you have a modem installed and it is able to send faxes.
> > > I have Winfax installed, so I know my modem is OK.
> > > Make sure you do not have the fax service disabled; Control Panel>Admin
> > > Tools>Services>Fax Service, either Manual or Automatic.
> > >
> > > Dim FaxServ As FAXCOMLib.FaxServer
> > > Dim FaxDoc As FAXCOMLib.FaxDoc
> > >
> > > Private Sub CommandButton1_Click()
> > >
> > > Set FaxServ = New FAXCOMLib.FaxServer
> > > FaxServ.Connect Environ("ComputerName")
> > > Set FaxDoc = FaxServ.CreateDocument("C:\fax.tiff")
> > >
> > > With FaxDoc
> > > .Filename = "c:\test.txt"
> > > .FaxNumber = "5555551212"
> > > .Send
> > > End With
> > >
> > > End Sub
> > >
> > > NickHK
> > >
> > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > news:B302681F-9AA9-49DD-8E83-375E004A56EF@microsoft.com...
> > > > Thanks. Its a little bit confusing, but I'm starting to play with it
> to
> > > see
> > > > if I can get something out of it. No luck so far though. The code
> executes
> > > > well and I am no longer getting an error message, but the code doesn't
> > > seem
> > > > to do anything.
> > > > I added FaxDoc.Send at the end and I got a -2147024864 Error message.
> > > > I'm kind of new to this whole Reference thing.
> > > > Regards,
> > > > Albert C
> > > >
> > > > "NickHK" wrote:
> > > >
> > > > > Albert,
> > > > > This should get you started ;
> > > > > http://www.codeguru.com/forum/archive/index.php/t-2...
> > > > >
> > > > > NickHK
> > > > >
> > > > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > > > news:D36402EE-DDDA-4EC7-949E-B43BD6125B39@microsoft.com...
> > > > > > Hi NickHK.
> > > > > > I've tried these:
> > > > > > faxcom1.0 Type Library
> > > > > > FaxControl1.0 Type Library
> > > > > > Microsoft Fax Service Extended COM Type Library
> > > > > >
> > > > > > I also tried to set up a reference to Windows/System32/WinFax.dll
> but
> > > I
> > > > > get
> > > > > > an error message.
> > > > > >
> > > > > > Thanks in advance,
> > > > > > Albert C
> > > > > >
> > > > > > "NickHK" wrote:
> > > > > >
> > > > > > > Albert,
> > > > > > > Which component are you using ?
> > > > > > >
> > > > > > > NickHK
> > > > > > >
> > > > > > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > > > > > news:5EFF17B9-BC3E-4163-AC0B-6F2BF63E29DA@microsoft.com...
> > > > > > > > Hello!
> > > > > > > > I'm trying to send a FAX through VBA without getting the Send
> Fax
> > > > > Dialog
> > > > > > > Box
> > > > > > > > that asks for the number to dial, etc...
> > > > > > > > I read on a previous thread that I had to set up a reference
> to
> > > the
> > > > > Fax
> > > > > > > > software.
> > > > > > > > I found a couple of libraries that had something to do with
> faxes.
> > > > > > > > However, I'm swamped in trying to control them.
> > > > > > > > I see some of the classes and members in the Object Explorer
> in
> > > VBE,
> > > > > but I
> > > > > > > > can't get anything to work.
> > > > > > > > Perhaps someone has done this?
> > > > > > > > Help would be very much appreciated.
> > > > > > > > Albert C
> > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
>
>
>

NickHK

12/18/2006 1:46:00 AM

0

Albert,
One way is to check the registry key
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts

NickHK

"Albert" <Albert@discussions.microsoft.com> wrote in message
news:5D07892A-0441-44D2-BB15-B8B6C6C7C1E2@microsoft.com...
> Hi NickHK,
> I finally nailed it quite nicely with PrintToFile=True
> Do you know some way to get a list of the available printers?
> Regards,
> Albert C
>
>
> Dim FaxServ As FAXCOMLib.FaxServer
> Dim FaxDoc As FAXCOMLib.FaxDoc
> Sub AutoFaxer()
>
> Application.ActivePrinter = "Fax en Ne01:"
> ActiveSheet.PrintOut , , , , , True, , ThisWorkbook.Path &
> "\PrintToFileAlbert.tiff"
>
> Set FaxServ = New FAXCOMLib.FaxServer
> FaxServ.Connect Environ("AlbertoCattan")
> Set FaxDoc = FaxServ.CreateDocument("C:\fax.tiff")
>
> With FaxDoc
> .Filename = ThisWorkbook.Path & "\PrintToFileAlbert.tiff"
> .FaxNumber = "9,012345678"
> .Send
> End With
>
> End Sub
>
>
> "NickHK" wrote:
>
> > Albert,
> > If you do not want to use Print to a fax (like WinFax), then you would
have
> > to save the range to a file first.
> > Here's one of the many that export a range to a graphics format ;
> > http://j-walk.com/ss/pup/pup6/fe...
> >
> > Then fax that output.
> >
> > NickHK
> >
> > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > news:D2A246E1-D745-4F2E-B045-78ED1E6C3B22@microsoft.com...
> > > Hi NickHK,
> > > Thank you so much... That was very cool stuff and now it did work.
> > > However, it only works if "c:\test.txt" exists. How would I go about
> > sending
> > > the PrintArea in my current workbook?
> > > Thanks again and best regards,
> > > Albert C
> > >
> > > "NickHK" wrote:
> > >
> > > > Albert,
> > > > Using W2K, so can't tell you about other OSs.
> > > >
> > > > First time I tried it, but this works, at least the sending fax and
Fax
> > > > queue dialogs comes up, but then I cancel, as I don't have a number
to
> > send
> > > > a fax at the moment.
> > > > I assume you have a modem installed and it is able to send faxes.
> > > > I have Winfax installed, so I know my modem is OK.
> > > > Make sure you do not have the fax service disabled; Control
Panel>Admin
> > > > Tools>Services>Fax Service, either Manual or Automatic.
> > > >
> > > > Dim FaxServ As FAXCOMLib.FaxServer
> > > > Dim FaxDoc As FAXCOMLib.FaxDoc
> > > >
> > > > Private Sub CommandButton1_Click()
> > > >
> > > > Set FaxServ = New FAXCOMLib.FaxServer
> > > > FaxServ.Connect Environ("ComputerName")
> > > > Set FaxDoc = FaxServ.CreateDocument("C:\fax.tiff")
> > > >
> > > > With FaxDoc
> > > > .Filename = "c:\test.txt"
> > > > .FaxNumber = "5555551212"
> > > > .Send
> > > > End With
> > > >
> > > > End Sub
> > > >
> > > > NickHK
> > > >
> > > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > > news:B302681F-9AA9-49DD-8E83-375E004A56EF@microsoft.com...
> > > > > Thanks. Its a little bit confusing, but I'm starting to play with
it
> > to
> > > > see
> > > > > if I can get something out of it. No luck so far though. The code
> > executes
> > > > > well and I am no longer getting an error message, but the code
doesn't
> > > > seem
> > > > > to do anything.
> > > > > I added FaxDoc.Send at the end and I got a -2147024864 Error
message.
> > > > > I'm kind of new to this whole Reference thing.
> > > > > Regards,
> > > > > Albert C
> > > > >
> > > > > "NickHK" wrote:
> > > > >
> > > > > > Albert,
> > > > > > This should get you started ;
> > > > > > http://www.codeguru.com/forum/archive/index.php/t-2...
> > > > > >
> > > > > > NickHK
> > > > > >
> > > > > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > > > > news:D36402EE-DDDA-4EC7-949E-B43BD6125B39@microsoft.com...
> > > > > > > Hi NickHK.
> > > > > > > I've tried these:
> > > > > > > faxcom1.0 Type Library
> > > > > > > FaxControl1.0 Type Library
> > > > > > > Microsoft Fax Service Extended COM Type Library
> > > > > > >
> > > > > > > I also tried to set up a reference to
Windows/System32/WinFax.dll
> > but
> > > > I
> > > > > > get
> > > > > > > an error message.
> > > > > > >
> > > > > > > Thanks in advance,
> > > > > > > Albert C
> > > > > > >
> > > > > > > "NickHK" wrote:
> > > > > > >
> > > > > > > > Albert,
> > > > > > > > Which component are you using ?
> > > > > > > >
> > > > > > > > NickHK
> > > > > > > >
> > > > > > > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > > > > > > news:5EFF17B9-BC3E-4163-AC0B-6F2BF63E29DA@microsoft.com...
> > > > > > > > > Hello!
> > > > > > > > > I'm trying to send a FAX through VBA without getting the
Send
> > Fax
> > > > > > Dialog
> > > > > > > > Box
> > > > > > > > > that asks for the number to dial, etc...
> > > > > > > > > I read on a previous thread that I had to set up a
reference
> > to
> > > > the
> > > > > > Fax
> > > > > > > > > software.
> > > > > > > > > I found a couple of libraries that had something to do
with
> > faxes.
> > > > > > > > > However, I'm swamped in trying to control them.
> > > > > > > > > I see some of the classes and members in the Object
Explorer
> > in
> > > > VBE,
> > > > > > but I
> > > > > > > > > can't get anything to work.
> > > > > > > > > Perhaps someone has done this?
> > > > > > > > > Help would be very much appreciated.
> > > > > > > > > Albert C
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> >
> >
> >


Albert

12/18/2006 2:11:00 AM

0

Hi NickHK,
I meant is there a way to find out, through VBA, what printers are available?
Albert

"NickHK" wrote:

> Albert,
> One way is to check the registry key
> HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts
>
> NickHK
>
> "Albert" <Albert@discussions.microsoft.com> wrote in message
> news:5D07892A-0441-44D2-BB15-B8B6C6C7C1E2@microsoft.com...
> > Hi NickHK,
> > I finally nailed it quite nicely with PrintToFile=True
> > Do you know some way to get a list of the available printers?
> > Regards,
> > Albert C
> >
> >
> > Dim FaxServ As FAXCOMLib.FaxServer
> > Dim FaxDoc As FAXCOMLib.FaxDoc
> > Sub AutoFaxer()
> >
> > Application.ActivePrinter = "Fax en Ne01:"
> > ActiveSheet.PrintOut , , , , , True, , ThisWorkbook.Path &
> > "\PrintToFileAlbert.tiff"
> >
> > Set FaxServ = New FAXCOMLib.FaxServer
> > FaxServ.Connect Environ("AlbertoCattan")
> > Set FaxDoc = FaxServ.CreateDocument("C:\fax.tiff")
> >
> > With FaxDoc
> > .Filename = ThisWorkbook.Path & "\PrintToFileAlbert.tiff"
> > .FaxNumber = "9,012345678"
> > .Send
> > End With
> >
> > End Sub
> >
> >
> > "NickHK" wrote:
> >
> > > Albert,
> > > If you do not want to use Print to a fax (like WinFax), then you would
> have
> > > to save the range to a file first.
> > > Here's one of the many that export a range to a graphics format ;
> > > http://j-walk.com/ss/pup/pup6/fe...
> > >
> > > Then fax that output.
> > >
> > > NickHK
> > >
> > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > news:D2A246E1-D745-4F2E-B045-78ED1E6C3B22@microsoft.com...
> > > > Hi NickHK,
> > > > Thank you so much... That was very cool stuff and now it did work.
> > > > However, it only works if "c:\test.txt" exists. How would I go about
> > > sending
> > > > the PrintArea in my current workbook?
> > > > Thanks again and best regards,
> > > > Albert C
> > > >
> > > > "NickHK" wrote:
> > > >
> > > > > Albert,
> > > > > Using W2K, so can't tell you about other OSs.
> > > > >
> > > > > First time I tried it, but this works, at least the sending fax and
> Fax
> > > > > queue dialogs comes up, but then I cancel, as I don't have a number
> to
> > > send
> > > > > a fax at the moment.
> > > > > I assume you have a modem installed and it is able to send faxes.
> > > > > I have Winfax installed, so I know my modem is OK.
> > > > > Make sure you do not have the fax service disabled; Control
> Panel>Admin
> > > > > Tools>Services>Fax Service, either Manual or Automatic.
> > > > >
> > > > > Dim FaxServ As FAXCOMLib.FaxServer
> > > > > Dim FaxDoc As FAXCOMLib.FaxDoc
> > > > >
> > > > > Private Sub CommandButton1_Click()
> > > > >
> > > > > Set FaxServ = New FAXCOMLib.FaxServer
> > > > > FaxServ.Connect Environ("ComputerName")
> > > > > Set FaxDoc = FaxServ.CreateDocument("C:\fax.tiff")
> > > > >
> > > > > With FaxDoc
> > > > > .Filename = "c:\test.txt"
> > > > > .FaxNumber = "5555551212"
> > > > > .Send
> > > > > End With
> > > > >
> > > > > End Sub
> > > > >
> > > > > NickHK
> > > > >
> > > > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > > > news:B302681F-9AA9-49DD-8E83-375E004A56EF@microsoft.com...
> > > > > > Thanks. Its a little bit confusing, but I'm starting to play with
> it
> > > to
> > > > > see
> > > > > > if I can get something out of it. No luck so far though. The code
> > > executes
> > > > > > well and I am no longer getting an error message, but the code
> doesn't
> > > > > seem
> > > > > > to do anything.
> > > > > > I added FaxDoc.Send at the end and I got a -2147024864 Error
> message.
> > > > > > I'm kind of new to this whole Reference thing.
> > > > > > Regards,
> > > > > > Albert C
> > > > > >
> > > > > > "NickHK" wrote:
> > > > > >
> > > > > > > Albert,
> > > > > > > This should get you started ;
> > > > > > > http://www.codeguru.com/forum/archive/index.php/t-2...
> > > > > > >
> > > > > > > NickHK
> > > > > > >
> > > > > > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > > > > > news:D36402EE-DDDA-4EC7-949E-B43BD6125B39@microsoft.com...
> > > > > > > > Hi NickHK.
> > > > > > > > I've tried these:
> > > > > > > > faxcom1.0 Type Library
> > > > > > > > FaxControl1.0 Type Library
> > > > > > > > Microsoft Fax Service Extended COM Type Library
> > > > > > > >
> > > > > > > > I also tried to set up a reference to
> Windows/System32/WinFax.dll
> > > but
> > > > > I
> > > > > > > get
> > > > > > > > an error message.
> > > > > > > >
> > > > > > > > Thanks in advance,
> > > > > > > > Albert C
> > > > > > > >
> > > > > > > > "NickHK" wrote:
> > > > > > > >
> > > > > > > > > Albert,
> > > > > > > > > Which component are you using ?
> > > > > > > > >
> > > > > > > > > NickHK
> > > > > > > > >
> > > > > > > > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > > > > > > > news:5EFF17B9-BC3E-4163-AC0B-6F2BF63E29DA@microsoft.com...
> > > > > > > > > > Hello!
> > > > > > > > > > I'm trying to send a FAX through VBA without getting the
> Send
> > > Fax
> > > > > > > Dialog
> > > > > > > > > Box
> > > > > > > > > > that asks for the number to dial, etc...
> > > > > > > > > > I read on a previous thread that I had to set up a
> reference
> > > to
> > > > > the
> > > > > > > Fax
> > > > > > > > > > software.
> > > > > > > > > > I found a couple of libraries that had something to do
> with
> > > faxes.
> > > > > > > > > > However, I'm swamped in trying to control them.
> > > > > > > > > > I see some of the classes and members in the Object
> Explorer
> > > in
> > > > > VBE,
> > > > > > > but I
> > > > > > > > > > can't get anything to work.
> > > > > > > > > > Perhaps someone has done this?
> > > > > > > > > > Help would be very much appreciated.
> > > > > > > > > > Albert C
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
>
>
>

NickHK

12/18/2006 4:22:00 AM

0

Albert,
Yes, read that key with VBA.
Take your pick:
http://www.google.co.uk/search?hl=en&q=read+registry+VBA&btnG=Google+Search...

NickHK

"Albert" <Albert@discussions.microsoft.com> wrote in message
news:DA0A8319-30CC-4092-9464-0AE6BBA261CD@microsoft.com...
> Hi NickHK,
> I meant is there a way to find out, through VBA, what printers are
available?
> Albert
>
> "NickHK" wrote:
>
> > Albert,
> > One way is to check the registry key
> > HKEY_CURRENT_USER\Software\Microsoft\Windows
NT\CurrentVersion\PrinterPorts
> >
> > NickHK
> >
> > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > news:5D07892A-0441-44D2-BB15-B8B6C6C7C1E2@microsoft.com...
> > > Hi NickHK,
> > > I finally nailed it quite nicely with PrintToFile=True
> > > Do you know some way to get a list of the available printers?
> > > Regards,
> > > Albert C
> > >
> > >
> > > Dim FaxServ As FAXCOMLib.FaxServer
> > > Dim FaxDoc As FAXCOMLib.FaxDoc
> > > Sub AutoFaxer()
> > >
> > > Application.ActivePrinter = "Fax en Ne01:"
> > > ActiveSheet.PrintOut , , , , , True, , ThisWorkbook.Path &
> > > "\PrintToFileAlbert.tiff"
> > >
> > > Set FaxServ = New FAXCOMLib.FaxServer
> > > FaxServ.Connect Environ("AlbertoCattan")
> > > Set FaxDoc = FaxServ.CreateDocument("C:\fax.tiff")
> > >
> > > With FaxDoc
> > > .Filename = ThisWorkbook.Path & "\PrintToFileAlbert.tiff"
> > > .FaxNumber = "9,012345678"
> > > .Send
> > > End With
> > >
> > > End Sub
> > >
> > >
> > > "NickHK" wrote:
> > >
> > > > Albert,
> > > > If you do not want to use Print to a fax (like WinFax), then you
would
> > have
> > > > to save the range to a file first.
> > > > Here's one of the many that export a range to a graphics format ;
> > > > http://j-walk.com/ss/pup/pup6/fe...
> > > >
> > > > Then fax that output.
> > > >
> > > > NickHK
> > > >
> > > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > > news:D2A246E1-D745-4F2E-B045-78ED1E6C3B22@microsoft.com...
> > > > > Hi NickHK,
> > > > > Thank you so much... That was very cool stuff and now it did work.
> > > > > However, it only works if "c:\test.txt" exists. How would I go
about
> > > > sending
> > > > > the PrintArea in my current workbook?
> > > > > Thanks again and best regards,
> > > > > Albert C
> > > > >
> > > > > "NickHK" wrote:
> > > > >
> > > > > > Albert,
> > > > > > Using W2K, so can't tell you about other OSs.
> > > > > >
> > > > > > First time I tried it, but this works, at least the sending fax
and
> > Fax
> > > > > > queue dialogs comes up, but then I cancel, as I don't have a
number
> > to
> > > > send
> > > > > > a fax at the moment.
> > > > > > I assume you have a modem installed and it is able to send
faxes.
> > > > > > I have Winfax installed, so I know my modem is OK.
> > > > > > Make sure you do not have the fax service disabled; Control
> > Panel>Admin
> > > > > > Tools>Services>Fax Service, either Manual or Automatic.
> > > > > >
> > > > > > Dim FaxServ As FAXCOMLib.FaxServer
> > > > > > Dim FaxDoc As FAXCOMLib.FaxDoc
> > > > > >
> > > > > > Private Sub CommandButton1_Click()
> > > > > >
> > > > > > Set FaxServ = New FAXCOMLib.FaxServer
> > > > > > FaxServ.Connect Environ("ComputerName")
> > > > > > Set FaxDoc = FaxServ.CreateDocument("C:\fax.tiff")
> > > > > >
> > > > > > With FaxDoc
> > > > > > .Filename = "c:\test.txt"
> > > > > > .FaxNumber = "5555551212"
> > > > > > .Send
> > > > > > End With
> > > > > >
> > > > > > End Sub
> > > > > >
> > > > > > NickHK
> > > > > >
> > > > > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > > > > news:B302681F-9AA9-49DD-8E83-375E004A56EF@microsoft.com...
> > > > > > > Thanks. Its a little bit confusing, but I'm starting to play
with
> > it
> > > > to
> > > > > > see
> > > > > > > if I can get something out of it. No luck so far though. The
code
> > > > executes
> > > > > > > well and I am no longer getting an error message, but the code
> > doesn't
> > > > > > seem
> > > > > > > to do anything.
> > > > > > > I added FaxDoc.Send at the end and I got a -2147024864 Error
> > message.
> > > > > > > I'm kind of new to this whole Reference thing.
> > > > > > > Regards,
> > > > > > > Albert C
> > > > > > >
> > > > > > > "NickHK" wrote:
> > > > > > >
> > > > > > > > Albert,
> > > > > > > > This should get you started ;
> > > > > > > >
http://www.codeguru.com/forum/archive/index.php/t-2...
> > > > > > > >
> > > > > > > > NickHK
> > > > > > > >
> > > > > > > > "Albert" <Albert@discussions.microsoft.com> wrote in message
> > > > > > > > news:D36402EE-DDDA-4EC7-949E-B43BD6125B39@microsoft.com...
> > > > > > > > > Hi NickHK.
> > > > > > > > > I've tried these:
> > > > > > > > > faxcom1.0 Type Library
> > > > > > > > > FaxControl1.0 Type Library
> > > > > > > > > Microsoft Fax Service Extended COM Type Library
> > > > > > > > >
> > > > > > > > > I also tried to set up a reference to
> > Windows/System32/WinFax.dll
> > > > but
> > > > > > I
> > > > > > > > get
> > > > > > > > > an error message.
> > > > > > > > >
> > > > > > > > > Thanks in advance,
> > > > > > > > > Albert C
> > > > > > > > >
> > > > > > > > > "NickHK" wrote:
> > > > > > > > >
> > > > > > > > > > Albert,
> > > > > > > > > > Which component are you using ?
> > > > > > > > > >
> > > > > > > > > > NickHK
> > > > > > > > > >
> > > > > > > > > > "Albert" <Albert@discussions.microsoft.com> wrote in
message
> > > > > > > > > >
news:5EFF17B9-BC3E-4163-AC0B-6F2BF63E29DA@microsoft.com...
> > > > > > > > > > > Hello!
> > > > > > > > > > > I'm trying to send a FAX through VBA without getting
the
> > Send
> > > > Fax
> > > > > > > > Dialog
> > > > > > > > > > Box
> > > > > > > > > > > that asks for the number to dial, etc...
> > > > > > > > > > > I read on a previous thread that I had to set up a
> > reference
> > > > to
> > > > > > the
> > > > > > > > Fax
> > > > > > > > > > > software.
> > > > > > > > > > > I found a couple of libraries that had something to do
> > with
> > > > faxes.
> > > > > > > > > > > However, I'm swamped in trying to control them.
> > > > > > > > > > > I see some of the classes and members in the Object
> > Explorer
> > > > in
> > > > > > VBE,
> > > > > > > > but I
> > > > > > > > > > > can't get anything to work.
> > > > > > > > > > > Perhaps someone has done this?
> > > > > > > > > > > Help would be very much appreciated.
> > > > > > > > > > > Albert C
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> >
> >
> >