Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple question: How to reference the currently open item

Status
Not open for further replies.

cthaxter

Programmer
Aug 2, 2001
71
US
I need to know what the code is for assigning the currently open item to a variable. I've looked around for the answer but can't find it.

More specifically, I want to put in an Outlook form the following code:

Code:
Sub Item_Save
   NewMC = "IPM.Contact.ITU"
   CurrentItem = '????
   If CurrentItem.MessageClass = "IPM.Contact" Then
      CurrentItem.MessageClass = NewMC
   End If
End Sub

where I need to assign to CurrentItem the currently open or selected contact item, and "ITU" is the name of the form that I'm creating.

Also, for those who may know, what are the various events that one can put after Item_ ? I know Item_Open executes when the item opens, but I need to know whether and how Item_Save and Item_Close work, and what other possibilities there are.

Thank you very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top