Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Programmatically Send Fax in SBS

COM and Automation

How to Programmatically Send Fax in SBS

by  Peping  Posted    (Edited  )
This describes a simple code to configure Small Business Server (SBS) 4.5 and SBS 2000 to send faxes by using the Microsoft Shared Fax Client component.

To programmatically send a fax using Shared Fax Client, you can use the Microsoft Outlook programming model. The code to configure SBS to send a fax by using Shared Fax Client is similar to the code we use to configure Outlook to send an e-mail messages except for the format of the "To" address. The "To" address must be in the following format, where xxx-xxxx is the phone number that you want to dial:

[fax: xxx-xxxx]

Example:

#DEFINE olMailItem 0

myOLApp = createobject("Outlook.Application")
myOLItem = myOLApp.CreateItem(olMailItem)

WITH myOLItem
.To = "[fax: 555 111-2222]"
.Subject = "Fax Subject"
.Body = "This is a sample fax."
** Just like in Outlook, an attachment can be added by
** inserting:
.Attachments.Add("C:\TEMP\sample.doc")
ENDWITH
myOLItem.Send

RELEASE myOLApp
RELEASE myOLItem

************************
All that is required to accomplish this task is to include a Fax Mail Transport in your Outlook profile. For Outlook 2002, go to Tools|E-mail Accounts|Add a new e-mail account|Additional Server Types|Fax Mail Transport. For Outlook 2000, go to Tools|Services and add the Fax Mail Transport there.

* Hope this is of help.
*
* Peping
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top