Article ID: 555020 - View products that this article applies to.
This article discusses the cause and solution when calling SendObject in Access using a Lotus Notes mail client, where the file attachment in the resulting Lotus Notes mail Memo created by SendObject has an incorrect file name and file suffix.
When Lotus Notes is your Mail Client and you call the SendObject Macro Action or SendObject Visual Basic Method in Microsoft Access and include an Access object in the e-mail to send as an attachment, be it a Form, Report or any other object, then, when the resulting Lotus Notes mail Memo is created, it contains a file attachment but the file attachment is incorrectly named and / or has an incorrect file type suffix.
Specifically the attachment contained in Lotus Notes mail Memo, contains an attachment item that has a name similar to "XXXX.xls" where XXXX may be any combination of letters and numbers, even though the SendObject call specified to sent the attachment as in RTF, Snapshot, Text or other file format.
As an example in Visual Basic, your database application makes a SendObject call like the following:
DoCmd.SendObject acSendReport, "My Report", acFormatRTF, "firstname.lastname@example.org", , , "Sending A Report", "This is the Access Report"
DoCmd.SendObject acSendReport, "My Form", "Snapshot Format (*.snp)", "email@example.com", , , "Sending A Form", "This is the Access Form"
The resulting Notes mail Memo contains an attachment named "C2B4.xls"
The problem may occur regardless of the Output Format used in the SendObject call.
When Access objects are sent as attachments to e-mail items using the SendObject action or SendObject method, Access creates a file that is based on the form or report object's name. If as an example, you specify that a Report called "Monthly Report" is to be included in the mail using a Snapshot format file, Access will always create a file named "Monthly Report.snp" for the attachment with the same name each time SendObject is called. This is expected behavior.
In a normal situation, during the process where the new mail Memo is created by Lotus Notes, a copy of the intended file attachment is created in the user's temp directory; Lotus Notes then attaches that temporary file to the new mail Memo and then deletes the temporary file from the temp directory.
If for any reason, the creation of the Notes mail Memo fails during this process, the temporary copy of the intended file attachment is left in the user's temp directory as an orphaned file.
If the user then calls SendObject again, with same Report or Form name specified (causing Access to create a file with the same name to use as an attachment ), when Notes attempts to create the temporary copy of the attachment file in the user's temp directory, the old orphaned file of the same name is found. So as to not to overwrite the original (now orphaned) file, a new temporary copy of the attachment file is created, however that temporary file is created with a name in the XXXX.xls format. That temporary .xls file is then attached to the Lotus Notes mail Memo.
The file internally is the correct .rtf, .snp or other format specified in the SendObject call, it is however improperly named in the Note Memo.
The problem can be solved by deleting any orphaned files of the same file type (e.g .snp, .rtf, .txt) that remain in the user's system temporary directory.
On Windows 98 and Me, the temporary directory is commonly located in the path:
On a Windows NT / 2000 / Xp or Server 2003 the temp directory is commonly located in the path:
%System Drive%\Documents and Settings\User Name\Local Settings\Temp
Where %System Drive% is the drive partition on which the operating system is installed, and User Name is the user's log on name.
However, on Windows 2000 and Xp the temp directory is by default a hidden directory. To view the files located in that directory you may have to open Windows Explorer and from the Tools menu item, select "Folder Options" and on the "View" tab, click "Show Hidden Files and Folders".
Then navigate in Explorer to the temp directory and delete any file that has the same name as the file you are expecting to be included as an e-mail attachment.
This problem may occur in all versions of Microsoft Access including Access 97, 2000, 2002 (Xp) and Access 2003 when Lotus Notes is the Mail Client.
Article ID: 555020 - Last Review: December 6, 2003 - Revision: 1.0
COMMUNITY SOLUTIONS CONTENT DISCLAIMER
MICROSOFT CORPORATION AND/OR ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY, RELIABILITY, OR ACCURACY OF THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN. ALL SUCH INFORMATION AND RELATED GRAPHICS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THIS INFORMATION AND RELATED GRAPHICS, INCLUDING ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, WORKMANLIKE EFFORT, TITLE AND NON-INFRINGEMENT. YOU SPECIFICALLY AGREE THAT IN NO EVENT SHALL MICROSOFT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, PUNITIVE, INCIDENTAL, SPECIAL, CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE, DATA OR PROFITS, ARISING OUT OF OR IN ANY WAY CONNECTED WITH THE USE OF OR INABILITY TO USE THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN, WHETHER BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY OR OTHERWISE, EVEN IF MICROSOFT OR ANY OF ITS SUPPLIERS HAS BEEN ADVISED OF THE POSSIBILITY OF DAMAGES.
Contact us for more help
Connect with Answer Desk for expert help.