Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   What is going on here (http://www.outlookbanter.com/add-ins-outlook/68506-what-going-here.html)

ITrishGuru March 12th 08 05:18 PM

What is going on here
 
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.

Sue Mosher [MVP-Outlook] March 12th 08 05:42 PM

What is going on here
 
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.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"ITrishGuru" wrote in message ...
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.



All times are GMT +1. The time now is 12:26 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com