J
Joacim Andersson [MVP - VB]
Thank you so much Sue, you're a lifesaver!!!
I'm downloading Outlook Spy right now.
Thanks to Roady as well for the information about the correct forums.
/Joacim
"Sue Mosher [MVP]" <SueMosherMVP> wrote in message
news:07E94340-37D5-4EE2-B7A7-7747F5F6F416@microsoft.com...
> As Roady said, this isn't the right forum for programming questions, but
> I've
> crossposted to the correct forum so followups can continue there.
> To get the sender address or any other property that is not exposed in the
> Outlook object model, use the PropertyAccessor object, e.g.:
> Set objAppt = <some expression that returns an AppointmentItem
> Set pa = objAppt.PropertyAccessor
> senderaddy = pa.GetProperty("urn:schemas:httpmail:fromemail")
> How can you learn the names of MAPI properties for use with the
> PropertyAccessor object? I usually look them up with the Outlook Spy or
> MFCMAPI.exe tool. That's easier than trying to wade through the MSDN
> documentation. Every Outlook developer should have one tool or the other.
> > Sue Mosher
> > >
> "Joacim Andersson [MVP - VB]" wrote:
>
> > 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
>
>
>>
I'm downloading Outlook Spy right now.
Thanks to Roady as well for the information about the correct forums.
/Joacim
"Sue Mosher [MVP]" <SueMosherMVP> wrote in message
news:07E94340-37D5-4EE2-B7A7-7747F5F6F416@microsoft.com...
> As Roady said, this isn't the right forum for programming questions, but
> I've
> crossposted to the correct forum so followups can continue there.
> To get the sender address or any other property that is not exposed in the
> Outlook object model, use the PropertyAccessor object, e.g.:
> Set objAppt = <some expression that returns an AppointmentItem
> Set pa = objAppt.PropertyAccessor
> senderaddy = pa.GetProperty("urn:schemas:httpmail:fromemail")
> How can you learn the names of MAPI properties for use with the
> PropertyAccessor object? I usually look them up with the Outlook Spy or
> MFCMAPI.exe tool. That's easier than trying to wade through the MSDN
> documentation. Every Outlook developer should have one tool or the other.
> > Sue Mosher
> > >
> "Joacim Andersson [MVP - VB]" wrote:
>
> > 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
>
>
>>