How to Programmatically Send a Fax in SBS (301109)



The information in this article applies to:

  • Microsoft Small Business Server 2000
  • Microsoft BackOffice Server 4.5

This article was previously published under Q301109

SUMMARY

This article describes the Microsoft Visual Basic for Applications (VBA) code that you can use to configure Small Business Server (SBS) 4.5 and SBS 2000 to send faxes by using the Microsoft Shared Fax Client component.

MORE INFORMATION

To programmatically send a fax by using Shared Fax Client, you can use the Microsoft Outlook programming model. The code that you use to configure SBS to send a fax by using Shared Fax Client is similar to the VBA code that you use to configure Outlook to send an e-mail message. This code is almost the same 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]

The following code is an example of the code that you can use to configure SBS to send fax by using Shared Fax Client:
Sub SendSBSFax()
    Dim myOLApp As New Outlook.Application
    Dim myOLItem As Outlook.MailItem
    Set myOLItem = myOLApp.CreateItem(olMailItem)

    With myOLItem
        .To = "[fax: 555 111-2222]"
        .Subject = "Fax Subject"
        .Body = "This is a sample fax."
    End With
    myOLItem.Send

    'cleanup
    set myOlAPP = Nothing
    set myOlItem = Nothing

End Sub
				

REFERENCES

For additional information about the Outlook programming model, click the article number below to view the article in the Microsoft Knowledge Base:

201096 How to Automate Outlook from Another Program


Modification Type:MajorLast Reviewed:11/3/2003
Keywords:kbenv kbinfo KB301109