A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

E-mail address of the meeting organizer



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 19th 09, 05:09 PM posted to microsoft.public.outlook.general,microsoft.public.outlook.program_vba
Joacim Andersson [MVP - VB]
external usenet poster
 
Posts: 1
Default E-mail address of the meeting organizer

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  
Old August 26th 09, 04:07 PM posted to microsoft.public.outlook.general,microsoft.public.outlook.program_vba
Sue Mosher [MVP][_2_]
external usenet poster
 
Posts: 89
Default E-mail address of the meeting organizer

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 08:28 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-2025 Outlook Banter.
The comments are property of their posters.