The information in this article applies to:
SYMPTOMSWhen you use Visual Basic Scripting Edition (VBScript), you cannot programmatically insert information into the body of an Outlook item without completely replacing the body. CAUSE
The Outlook object model provides only one property for this part of the
item, the Body property. The Body property enables you to programmatically
create and delete the body text, but it does not enable you to insert or
modify information that is in the middle of the body.
If you want to programmatically insert a product name in between the lines,
there is no method or property available that will not completely replace
all of the body, as shown in the following examples.
Item.Body = "This is new text" This example would completely replace the existing text with the new text.Because different server applications (Outlook, WordMail, and so on.) can provide the Body property of a mail message, there is no one, common object model to facilitate modifications within the Body property. WORKAROUNDMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft Support professionals 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 needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/overview/overview.aspThe following Outlook VBScript enables you to insert text within the Body property of the example in the "Cause" section. It does so by parsing the existing text and re-inserting new body text.
REFERENCESQ166368 OL97: How to Get Help Programming with Outlook Additional query words: OutSol OutSol97
Keywords : |
Last Reviewed: November 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |