Microsoft KB Archive/924610

= The body text of the e-mail message disappears when you add an attachment by using the Attachments.Add method in Outlook 2000 =

Article ID: 924610

Article Last Modified on 1/17/2007

-

APPLIES TO


 * Microsoft Outlook 2000 Standard Edition

-



SYMPTOMS
Consider the following scenario:
 * In Microsoft Outlook 2000, you click an e-mail message in the Inbox, and then you click Reply.
 * You add an attachment to the e-mail message by using the Attachments.Add method in the Microsoft Outlook object model.

In this scenario, the body text of the e-mail message disappears.



WORKAROUND
To work around this problem, call the Save method before and after you add an attachment to the e-mail message by using the Attachments.Add method. The following Microsoft Visual Basic script code sample demonstrates how to do this.

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. Sub AttachFile Dim mi As MailItem Set mi = Application.ActiveInspector.CurrentItem mi.Save mi.Attachments.Add &quot;C:\test.txt&quot; mi.Save End Sub Note If you use this workaround, a draft of the e-mail message is automatically saved in the Drafts folder. This behavior occurs because the Save method explicitly saves the e-mail message in the Drafts folder.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

This problem only occurs in Outlook 2000. This problem was corrected in Outlook 2002 and Outlook 2003.



MORE INFORMATION
For more information about the Attachments.Add method in Outlook 2000, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/aa217214(office.10).aspx

For more information about the Save method in Outlook 2000, visit the following MSDN Web site:

http://msdn2.microsoft.com/en-us/library/aa179008(office.10).aspx

Keywords: kbcode kbemail kbtshoot kbprb KB924610

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.