What is going on here

I

ITrishGuru

Hi all,
I'm not sure about the follwoing piece of code.
Outlook.MailItem Item = (Outlook.MailItem)Inspector.CurrentItem;

What is actually happening here?
Is this a cast statement?
Or is it a way of linking addresses of a mailitems inspector?

Cheers,
Kevin.
 
S

Sue Mosher [MVP-Outlook]

That statement takes the item displayed in an Inspector window and attempts to cast it as an Outlook.MailItem to an object named Item. If successful, the addresses for the item displayed in the Inspector will be available through the Item.Recipients 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