Microsoft KB Archive/228512

= You cannot display or save an item by using GetItemFromID in Outlook 2000 =

Article ID: 228512

Article Last Modified on 6/27/2006

-

APPLIES TO


 * Microsoft Outlook 2000 Standard Edition

-



This article was previously published under Q228512





SYMPTOMS
You try to programmatically display or save an item, but the Display or Save methods in the Outlook object model do not seem to work.



CAUSE
Both the Display and the Save methods in the Outlook object model do not work when you try to programmatically save or display an Outlook item if the following conditions are true:

 You referenced the item using the GetItemFromID method.

-and-

 The item is based on a custom form containing Visual Basic Scripting Edition (VBScript) code.

-and-

 The form definition is not stored in the item.



RESOLUTION
To resolve this problem, download and install the update described in this article.

How to Download and Install the Update
IMPORTANT: The installation of the update that is described in this article has the following requirements:  Microsoft Windows Installer 2.0

Before you install this update, you must install Windows Installer 2.0 or later. For additional information about this requirement, see the "Windows Installer 2.0 Update Requirements" section of this article. Microsoft Office 2000 Service Pack 3 (SP-3)

Before you install this update, install Office 2000 Service Pack 3 (SP-3). For more information about how to install Office 2000 SP-3, click the following article number to view the article in the Microsoft Knowledge Base:

326585 Description of the Office 2000 Service Pack 3

</li></ul>

Client Update
To download and install the client update, follow these steps: <ol> Visit the following Microsoft Web site:

http://download.microsoft.com/download/5/8/d/58dc27f4-babd-44d7-8bcc-7171c521f5d6/228512.exe

</li> Click Save to save the 228512.exe file to the selected folder.</li> In Windows Explorer, double-click 228512.exe.</li> If you are prompted to install the update, click Yes.</li> Click Yes to accept the License Agreement</li> Insert your Office 2000 CD-ROM when you are prompted to do so, and then click OK.</li> When you receive a message that indicates the installation was successful, click OK.</li></ol>

NOTE: After you install the update, you cannot remove it. To return to an installation before the update was installed, you must remove all of Office 2000, and then install it again from the original CD.

Administrative Update
If you installed Outlook from a server location, the server administrator must update the server location with the administrative public update and deploy that update to your computer.

If you are the server administrator, follow these steps to download the administrative update: <ol> Visit the following Microsoft Web site:

http://download.microsoft.com/download/5/8/d/58dc27f4-babd-44d7-8bcc-7171c521f5d6/228512a.exe

</li> Download the file to your desktop.</li> In Windows Explorer, double-click 228512a.exe.</li> Click Yes to accept the License Agreement.</li> In the Please type the location where you want to place the extracted files box, type C:\228512a, and then click OK.</li> Click Yes when you are prompted to create the folder</li> If you are familiar with the procedure to update your administrative installation, click Start and then click Run. Type the following command in the Open box msiexec /a \  /p C:\ 228512a \  SHORTFILENAMES=1

where  is the path to your administrative installation point for Office 2000 (for example, C:\Office2000), and

where  is the .msi database package for the Office 2000 product (for example, Data1.msi), and

where  is the name of the administrative update.

NOTE: You can append "/qb+" (without the quotation marks) to the command line, so that the Office 2000 Administrative Installation dialog box and the End User License Agreement dialog box do not appear</li> To deploy the update to the client workstations, click Start, and then click Run. Type the following command in the Open box msiexec /i \  REINSTALL=  REINSTALLMODE=vomu

where  is the path to your administrative installation point for Office 2000 (for example, C:\Office2000), and

where  is the MSI database package for the Office 2000 product (for example, Data1.msi), and

where is the list of feature names (case sensitive) that have to be reinstalled for the update. To install all features, you can use REINSTALL=ALL or you can use the following list of features: <ul> <li>OUTLOOKFiles</li> <li>OUTLOOKNonBootFiles</li></ul> </li></ol>

How to Determine Whether the Update is Installed
The update contains updated versions of the following files: <pre class="fixed_text">File Name   Version --- Outllib.dll 9.0.0.7119 Recall.dll  9.0.0.7031 In Outlook, click About Microsoft Outlook on the Help menu to determine the version that is on your computer. If the update is installed, version 9.0.0.7119 appears in the About Microsoft Outlook dialog box.

NOTE: If the update is already installed on your computer, you receive the following message when you try to install the update:

This update has already been applied or is included in an update that has already been applied.

Windows Installer 2.0 Update Requirements
The installation of the update described in this article requires that your version of Microsoft Windows Installer be 2.0 or later. Microsoft Windows 2000 Service Pack 3 (SP-3) include this version of the Windows Installer. To install the latest version of the Windows Installer, visit one of the following Microsoft Web sites

For Windows Installer for Microsoft Windows 95, Microsoft Windows 98, and Microsoft Windows Millenium Edition (Me):

http://www.microsoft.com/downloads/details.aspx?FamilyID=cebbacd8-c094-4255-b702-de3bb768148f%20&displaylang=en

For Windows Installer for Windows NT 4.0 and 2000:

http://www.microsoft.com/downloads/details.aspx?familyid=4B6140F9-2D36-4977-8FA1-6F8A0F5DCA8F

<div class="workaround_section">

WORKAROUND
Depending on the needs of your solution, you can work around the problem by using a different method to reference the item. For more information about how to programmatically reference items,, click the following article number to view the article in the Microsoft Knowledge Base:

208520 Programming examples for referencing items and folders in Outlook 2000

<div class="status_section">

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

<div class="moreinformation_section">

MORE INFORMATION
This problem is not related to the type of folder the items are stored in. The problem occurs regardless of whether the folder is stored in a Personal Folders (.pst) file, Microsoft Exchange public folders, or a Microsoft Exchange mailbox.

Steps to Reproduce the Behavior
<ol> <li>Create a new folder, in this case a Contacts folder.</li> <li>Open a new contact.</li> <li>On the Tools menu, point to Forms, and then click Design This Form.</li> <li> On the Form menu, click View Code. Enter the following VBScript code into the Script Editor and then close the Script Editor: Dim x                   </li> <li>On the Tools menu, point to Forms, and then click Publish Form. The default is to store the Contact form in the folder you created in step 1. Type GetItemFromID Test1 as the Display Name, and then click Publish.</li> <li>Close and do not save changes to the form.</li> <li>On the Actions menu, click New GetItemFromID Test1. Enter some contact information and save the contact.</li> <li>Open a new, default contact.</li> <li>On the Tools menu, point to Forms, and then click Design This Form.</li> <li>Click the P.2 page of the form.</li> <li>On the Form menu, click Control Toolbox. Drag a CommandButton control onto the P.2 page of the form.</li> <li> On the Form menu, click View Code. Enter the following VBScript code into the Script Editor and then close the Script Editor: Sub CommandButton1_Click Dim ns, myFolder, myItem, myEntryID, myStoreID Set ns = Application.GetNamespace("MAPI") Set myFolder = Application.ActiveExplorer.CurrentFolder Set myItem = myFolder.Items(1) MsgBox "First item in folder: " & myItem.Subject myEntryID = myItem.EntryID myStoreID = myItem.Parent.StoreID Set myItem = Nothing Set myItem = ns.GetItemFromID(myEntryID, myStoreID) MsgBox "Item found using GetItemFromID: " & myItem.Subject myItem.Display Set myItem = Nothing Set myFolder = Nothing Set ns = Nothing End Sub </li> <li>On the Tools menu, point to Forms, and then click Publish Form. The default is to store the Contact form in the folder you created in step 1. Type GetItemFromID Test2 as the Display Name, and then click Publish.</li> <li>Close and do not save changes to the form.</li> <li>On the Actions menu, click New GetItemFromID Test2. Switch to the P.2 page of the form, and then click CommandButton.</li></ol>

Result: You receive two message boxes indicating that Outlook has referenced the first item in the folder, but then the item does not appear.

<div class="references_section">