OL98: Form Name Not Updated When Programmatically Published

ID: Q186453

The information in this article applies to:

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

1. Publish a mail message to your Inbox. To do this, follow these steps:

   a. Open a new mail message.

   b. On the Tools menu, click Forms, and then click Publish Form As.

   c. Set the destination to your Inbox, name the form MyForm, and then
      click Publish.

   d. Close and do not save changes to the mail message.

2. 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

3. In Outlook 98, click on the Actions menu.

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.

REFERENCES

For more information about creating solutions with Microsoft Outlook 98, please see the following articles in the Microsoft Knowledge Base:

   Article-ID: Q180826
   Title     : OL98: Resources for Custom Forms and Programming

   Article-ID: Q182349
   Title     : OL98: Questions About Custom Forms and Outlook Solutions

Additional query words: OutSol OutSol98

Keywords          : kbdta OffVBS
Version           : WINDOWS:
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbpending

Last Reviewed: November 11, 1998