![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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]" wrote in message ... 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, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "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.GetDef aultFolder(Outlook.OlDefaultFolders.olFolderCalend ar), 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 |
Ads |
#2
|
|||
|
|||
![]()
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, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "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.GetDef aultFolder(Outlook.OlDefaultFolders.olFolderCalend ar), 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
how do you show the meeting organizer name in calendar meeting vie | davhar11 | Outlook - Calandaring | 2 | July 20th 09 05:33 PM |
change meeting organizer of recurring meeting without cancellnig | lucyfoot | Outlook - Calandaring | 1 | March 27th 09 06:55 PM |
Can't cancel meeting! Meeting organizer appointment not showing in mycalendar but shown in invitees | Rod F | Outlook - Calandaring | 0 | March 6th 09 09:41 AM |
Meeting organizer cannot view recuring meeting but attendee's can | bobr | Outlook - Calandaring | 0 | February 28th 07 06:28 PM |
Meeting Organizer deleted meeting, but chose not to notify users.. | X-Jack | Outlook - Calandaring | 1 | April 3rd 06 05:15 PM |