Accessing another custom form and the associated custom property

M

melon

Supposed I have a ItemA created with custom Form1, and ItemB created
with Form2.

Is it possible for ItemB to access user properties on ItemA? If so,
how do I open the ItemA in ItemB? Is there any item identifier that I
can use?
 
K

Ken Slovak - [MVP - Outlook]

There are a few ways.

If the ItemB is selected you can access the ActiveExplorer.Selection
collection.

If the item is opened already you can iterate the Inspectors collection and
see which open Inspectors have your custom MessageClass or some identifying
tag and get a handle to the item that way.

If you know the folder the items would live in you can access the Items
collection of that MAPIFolder object and iterate that until you find the
item by MessageClass or some other identifier.

If you know ahead of time which items you might want to access you can store
their EntryID property and use NameSpace.GetItemFromID(EntryID) to get the
item.

Once you have the item you can access its UserProperties collection.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top