Microsoft KB Archive/186453

= OL98: Form Name Not Updated When Programmatically Published =

Article ID: 186453

Article Last Modified on 2/27/2004

-

APPLIES TO


 * Microsoft Outlook 98 Standard Edition

-



This article was previously published under Q186453



SYMPTOMS
When you attempt to create a new item using a custom form and republish the form using a new name, the Display Name is not updated correctly.



STATUS
Microsoft has confirmed this to be a problem with Microsoft Outlook 98.



MORE INFORMATION
This problem occurs with all types of items, and it does not matter if the items are created by your Visual Basic for Applications code or through the user interface.

This problem does not occur if you use Visual Basic for Applications code to publish a standard item type, instead of using an item based on a custom form.

Steps to Reproduce the Problem
 Publish a mail message to your Inbox. To do this, follow these steps:

 Open a new mail message. On the Tools menu, click Forms, and then click Publish Form As. Set the destination to your Inbox, name the form MyForm, and then click Publish. Close and do not save changes to the mail message. </li>  Run the following Visual Basic for Applications code: Sub PublishForm Set ol = New Outlook.Application Set olns = ol.GetNamespace("MAPI") Set MyFolder = olNS.GetDefaultFolder(olFolderInbox) Set MyItem = MyFolder.Items.Add("IPM.Note.MyForm") Set MyForm = MyItem.FormDescription MyForm.Name = "MyForm2" MyForm.PublishForm olFolderRegistry, MyFolder MyItem.Close olDiscard End Sub </li> In Outlook 98, click on the Actions menu.</li></ol>

You will now see two forms listed as MyForm. The message class of the newly published form is set to IPM.Note.MyForm2, but the Display Name of the form remains MyForm.

<div class="references_section">