View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Setting Up References in the VBE

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 PanelAdmin
ToolsServicesFax 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" wrote in message
...
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/archiv.../t-259837.html

NickHK

"Albert" wrote in message
...
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" wrote in message
...
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