Hi all,
I don't know if this is the correct news group for this question, if it
isn't please inform me.
What I need to do is to programmatically get the e-mail address of a meeting
organizer. I'm using VSTO and Outlook 2007. Below is a some sample code
similar to what I'm using, I get all AppointmentItems for the current week.
If any of these is a meeting I need to get the e-mail address of the
organizer, but all I get is the name. There doesn't seem to be any way to
convert an AppointmentItem into a MeetingItem, but Outlook itself have no
problem showing the information I need if I manually double click the
appointment in the calendar.
Dim folder =
CType(Globals.ThisAddIn.Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar),
Outlook.Folder)
Dim monday = DateAdd(DateInterval.Day, -(Weekday(DateTime.Today,
FirstDayOfWeek.Monday) - 1), DateTime.Today)
Dim items = From item In folder.Items _
Select item = CType(item, Outlook.AppointmentItem) _
Where (item.Start >= monday AndAlso item.Start <
DateAdd(DateInterval.Day, 6, monday))
For Each itm In items
If itm.MeetingStatus <> Outlook.OlMeetingStatus.olNonMeeting Then
'This is a meeting, so how can I get the e-mail address of the
organizer
End If
Next
Are anyone here enough familiar with the Outlook object model to give me any
hint in the correct direction?
Cheers,
Joacim