Microsoft KB Archive/183035

= OL97: Outlook Stays in Memory After Using Attachments via Code =

Article ID: 183035

Article Last Modified on 1/22/2007

-

APPLIES TO


 * Microsoft Outlook 97 Standard Edition

-



This article was previously published under Q183035



SYMPTOMS
You are creating a public folder solution using Microsoft Outlook 97 and after using the Outlook forms in the solution, either of the following two symptoms occur:


 * Outlook will not completely exit from memory.
 * A "conflicting edits" scenario will be created where it appears as though two users were editing an item at the same time, even though this was not the case.

NOTE: These problems typically happen when using the Help Desk and Document Tracking sample applications available with Outlook.



CAUSE
Programmatically creating attachments in an item can cause Outlook to not exit properly, fully close, or release an item. Both of these sample applications use Visual Basic Scripting Edition (VBScript) code to create a mail message which contain a link to an item in a public folder.



WORKAROUND
Microsoft 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://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

Use either of the following two workarounds:

 Upgrade to Microsoft Outlook 98.  Modify the solution so that it doesn't use attachments. You can use the Outlook protocol to create a link to an item in a public folder instead of using an attachment. The protocol can refer to either items or folders, and when used with items, it uses the Subject field of an item to refer to it, so a limitation of this approach is that each item in the folder must have a unique Subject field.

An example of the syntax for the Outlook protocol is:       When specifying the path to the item, use the tilde character (~) to denote when Outlook should find an item with a matching subject. In the above example, "My Subject" is the text that is in the subject field of the item.

To use the protocol programmatically, you create the link by inserting the text of the protocol string into the Body property of the item. For example, in VBScript, the syntax would be: Item.Body = Item.Body & "Outlook://Public Folders/~My Subject" 



STATUS
Microsoft has confirmed this to be a problem in Microsoft Outlook 97. This problem has been corrected in Microsoft Outlook 98.

