Microsoft KB Archive/177624

= How To Display a Closed Message =

Article ID: 177624

Article Last Modified on 6/30/2004

-

APPLIES TO


 * Microsoft Visual Basic for Applications 5.0
 * Microsoft Outlook 97 Service Pack 1
 * Microsoft Outlook 97 Service Pack 1
 * Microsoft Outlook 97 Standard Edition

-



This article was previously published under Q177624



SUMMARY
Some applications may require hiding a currently-displayed message in order to display additional information. The following article describes how to close the message and redisplay it. The message used in the sample code below is created from a regular message (such as message class is IPM.Note), but the same logic should work for any message class.



MORE INFORMATION
The code below creates a message, hides (closes) it, and then redisplays it. It is from the Click event of a CommandButton named Command1.

NOTE: This code assumes that the project references include the "Microsoft Outlook 8.0 Object Library." Private Sub Command1_Click Dim objOutApp As Outlook.Application Dim mail As Object Set objOutApp = CreateObject("Outlook.application") Set mail = objOutApp.CreateItem(0) mail.messageclass = "IPM.Note" mail.Save mail.Display mail.Close (0) objOutApp.ActiveExplorer.Currentfolder.Items("").display End Sub

Keywords: kbhowto KB177624

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.