Sign in to follow this  
Followers 0
foster74

MS Outlook 2007 Mapi object variables resource?

4 posts in this topic

I've searched the forums a lot and have been on MSDN for the past hour and I am absolutely horrible at navigating it.

$objOutlook = ObjCreate("Outlook.Application")
$objNameSpace = $objOutlook.GetNamespace("MAPI")
$objFolder = $objNamespace.GetDefaultFolder(6)
$numItems = $objFolder.Items.Count
$objMessage = $objFolder.Items(1)
$Subject = $objMessage.Subject()
$Body = $objMessage.Body()

I'm not even sure what they are called, but does anyone know where I can find the list of the items like the .Items, .Subject, and .GetDefaultFolder and such? This would be of great help and would be extremely appreciated. Thank you in advance!

Share this post


Link to post
Share on other sites



Here's a reference: http://www.outlookcode.com/article.aspx?id=37

I don't have Outlook 2007 installed on this computer, but if you can get to the visual basic editor (or something like that) then it'll pretty well show you everything you can use... I think it's one of the options while editing macros.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Here you can find the Outlook.udf. Maybe it already offers the functions you are looking for or you could have a look at the code to see how it's done.

Or maybe OutlookSpy could be the tool you're looking for:

OutlookSpy is the ultimate Outlook developer tool. Integrated directly into Outlook, it provides fast and convenient access to all Outlook Object Model objects, lets you examine values of the properties, call functions, browse object hierarchy and monitor Outlook events.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0