Article ID: 299016 - Last Review: October 11, 2006 - Revision: 6.4 How to fax from Access by using the SendObject command in Access 2002This article was previously published under Q299016 On This PageSUMMARY
This article describes how to create a macro and a Visual Basic procedure
to fax a report from Microsoft Access. The examples assume that you have
Microsoft Outlook, Microsoft Fax, and a fax modem installed, and that they are working. Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. Outlook e-mail securityThe following code may not work correctly if you have installed the Outlook E-mail Security Update. For additional information about this update for Outlook 2000, click the following article number to view the article in the Microsoft Knowledge Base:262631
(http://support.microsoft.com/kb/262631/
)
OL2000: Information About the Outlook E-mail Security Update
For additional information about this update for Outlook 98, click the following article number to view the article in the Microsoft Knowledge Base:
262617
(http://support.microsoft.com/kb/262617/
)
OL98: Information About the Outlook E-mail Security Update
If your fax does not have correct formatting, you may want to change your default e-mail editor to Microsoft Word.For more information about the Outlook 2002 e-mail security features and how those features can affect custom solutions, click the following article number to view the article in the Microsoft Knowledge Base: 290500
(http://support.microsoft.com/kb/290500/
)
Description of the developer-related e-mail security features in Outlook 2002
Using the SendObject methodThe examples that are used in this article refer to the sample database Northwind.mdb. The examples show you how to create a macro and a Visual Basic procedure to fax a report by using Microsoft Fax. However, you can also use an Access project (.adp) file for faxing information.When you use the SendObject method in Microsoft Access, you must have a messaging application, such as Microsoft Outlook, that supports the Microsoft Mail Applications Programming Interface, also known as MAPI. If Microsoft Outlook 2002 is installed on your computer, and you try to run the macro or the code to fax a report by using Microsoft Fax, you may not be able to fax the report successfully. For additional information, click the following article number to view the article in the Microsoft Knowledge Base: 319820
(http://support.microsoft.com/kb/319820/
)
OL2002: You Receive an NDR When You Use a Simple MAPI Program to Send a Message
If Outlook is running when you try to run the macro or the code, you may receive a message that is similar to the following:
If you receive this message, close Outlook and then run the code again. If you have an electronic mail application that uses the Vendor Independent Mail (VIM) protocol, you have to install and to setup the dynamic-link library that is named Mapivim.dll. Mapivim.dll converts MAPI mail messages to the VIM protocol. Now you can send Microsoft Access objects to the VIM mail application. CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database. Creating a macroThis example uses the SendObject action to fax the Catalog report to a single fax number.
Creating a Visual Basic procedureNote The sample code in this article uses Microsoft Data Access Objects. For this code to run correctly, you must reference the Microsoft DAO 3.6 Object Library. To do so, click References on the Tools menu in the Visual Basic Editor, and make sure that the Microsoft DAO 3.6 Object Library check box is selected. This example shows you how to fax the Invoice report to each customer in the Customers table.
To change the association for .rtf documents to WordPad, follow these steps:
REFERENCESThis article describes a technique that is demonstrated in the sample file that is named RptSmp00.exe. For additional information about how to obtain this sample file, click the following article number to view the article in the Microsoft Knowledge Base: 231851
(http://support.microsoft.com/kb/231851/
)
The "Access 2000 sample: report topics database available in Download Center
For additional information about how Outlook 2000 may be affected by the Outlook E-mail Security Update, click the following article number to view the article in the Microsoft Knowledge Base:
262634
(http://support.microsoft.com/kb/262634/
)
OL2000: Known Issues with the Outlook E-mail Security Update
For additional information about how Outlook 98 may be affected by the Outlook E-mail Security Update, click the following article number to view the article in the Microsoft Knowledge Base:
262618
(http://support.microsoft.com/kb/262618/
)
OL98: Known Issues with the Outlook E-mail Security Update
For more information about SendObject, click Microsoft Visual Basic Help on the
Help menu, type SendObject action in the Office Assistant or
the Answer Wizard, and then click Search to view the topics
returned.For more information about OutputTo, click Microsoft Visual Basic Help on the Help menu, type OutputTo in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned. For more information about FindFirst, click Microsoft Visual Basic Help on the Help menu, type FindFirst Method in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.
| Article Translations
|

Back to the top
