Sending multiple reports by fax

J

Jacinda

Good afternoon,
[Access 2003]
I want to send a report by fax to each of our customers, as new orders are
opened. The fax action would be generated from a button on a form

My question is: does it make more sense to use VBA and program the button to
use Outlook or just set up the fax print driver as the default printer for
that report.

What I would like to avoid it entering in the fax number by hand. That
information will be stored on my tables, and I would like to just pull the
number from the table and send the report via fax.

Any thoughts
 
S

Stuart McCall

Jacinda said:
Good afternoon,
[Access 2003]
I want to send a report by fax to each of our customers, as new orders are
opened. The fax action would be generated from a button on a form

My question is: does it make more sense to use VBA and program the button
to
use Outlook or just set up the fax print driver as the default printer for
that report.

What I would like to avoid it entering in the fax number by hand. That
information will be stored on my tables, and I would like to just pull the
number from the table and send the report via fax.

Any thoughts

If you have the dll:

c:\windows\fxscom.dll

on your system then you can try this: set a reference to 'faxcom 1.0 Type
Library' and use the following code:

Dim doc As FAXCOMLib.FaxDoc
'
With New FAXCOMLib.FaxServer
.Connect "\\SERVER_NAME"
Set doc = .CreateDocument("c:\My Documents\MyFax.doc")
doc.FaxNumber = "01234567890"
doc.RecipientName = "John Smith"
doc.Send
Set doc = Nothing
.Disconnect
End With
 
J

Jacinda

Thank you, this is a great start but I think I'm missing a piece of this
puzzle... where do I tie in my report on this code. As is I got a debug
error...
--
-Jacinda


Stuart McCall said:
Jacinda said:
Good afternoon,
[Access 2003]
I want to send a report by fax to each of our customers, as new orders are
opened. The fax action would be generated from a button on a form

My question is: does it make more sense to use VBA and program the button
to
use Outlook or just set up the fax print driver as the default printer for
that report.

What I would like to avoid it entering in the fax number by hand. That
information will be stored on my tables, and I would like to just pull the
number from the table and send the report via fax.

Any thoughts

If you have the dll:

c:\windows\fxscom.dll

on your system then you can try this: set a reference to 'faxcom 1.0 Type
Library' and use the following code:

Dim doc As FAXCOMLib.FaxDoc
'
With New FAXCOMLib.FaxServer
.Connect "\\SERVER_NAME"
Set doc = .CreateDocument("c:\My Documents\MyFax.doc")
doc.FaxNumber = "01234567890"
doc.RecipientName = "John Smith"
doc.Send
Set doc = Nothing
.Disconnect
End With
 
S

Stuart McCall

Jacinda said:
Thank you, this is a great start but I think I'm missing a piece of this
puzzle... where do I tie in my report on this code. As is I got a debug
error...
--
-Jacinda


Stuart McCall said:
Jacinda said:
Good afternoon,
[Access 2003]
I want to send a report by fax to each of our customers, as new orders
are
opened. The fax action would be generated from a button on a form

My question is: does it make more sense to use VBA and program the
button
to
use Outlook or just set up the fax print driver as the default printer
for
that report.

What I would like to avoid it entering in the fax number by hand. That
information will be stored on my tables, and I would like to just pull
the
number from the table and send the report via fax.

Any thoughts

If you have the dll:

c:\windows\fxscom.dll

on your system then you can try this: set a reference to 'faxcom 1.0 Type
Library' and use the following code:

Dim doc As FAXCOMLib.FaxDoc
'
With New FAXCOMLib.FaxServer
.Connect "\\SERVER_NAME"
Set doc = .CreateDocument("c:\My Documents\MyFax.doc")
doc.FaxNumber = "01234567890"
doc.RecipientName = "John Smith"
doc.Send
Set doc = Nothing
.Disconnect
End With

I must admit I've never had occasion to use this code. I got it from a
colleague about a year ago. As I understand it, you need to set up a machine
as a fax server. I don't know what that entails, sorry. My guess is that you
need to set up the fax printer on this m/c, but how you set it up as a
server I have no idea. Consult a networky sort of guy for this.

Once the m/c is configured, use it's name when assigning the.Connect
property.

I believe that the document it sends must be a registered file type such as
doc or xls. You'll need to output the report as an snp I would imagine.
Failing that, export to word.
Then specify your outputted document via the 'Set doc = .CreateDocument'
method.

Hope that helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top