RE: E-mail address of the meeting organizer

  • Thread starter Joacim Andersson [MVP - VB]
  • Start date
Status
Not open for further replies.
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
>

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

>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
D Cancelled Meeting Notifications to another mail address Outlook VBA and Custom Forms 1
Terry Sullivan Sender Field Displays My E-Mail Address, Not My Name Using Outlook 1
M Move new mail to folder based on sender address Outlook VBA and Custom Forms 2
Brostin Forward a mail to the address listed in the email text Outlook VBA and Custom Forms 1
C Why can junk mail be from one’s own email address? Using Outlook 7
I Collecting mail address from GAB and adding to Outlook Task Using Outlook 2
T Create Rule For Secondary E-Mail Address In Outlook 2016 Using Outlook 4
Diane Poremsky Make the Address Book show only e-mail addresses, not fax numbers Using Outlook 0
C Change From address while sending a new mail Outlook VBA and Custom Forms 5
L Adding sender's e-mail to global address book DL Outlook VBA and Custom Forms 1
L E-mail Address Using Outlook 14
T Outlook 2010 - Contacts associated with an e-mail address Using Outlook 1
D Show this folder as an e-mail Address Book is enabled but I want to disable Using Outlook 2
N Outllok adds unwanted period in my e-mail address Using Outlook 1
D Search for e-mail address Using Outlook 4
J Sending Mail From A Different Address Using Outlook 2011 for Mac Using Outlook 0
A How to forward all e-mails from one address to five (5) other e-mail address? Using Outlook 1
M How to clean duplicate/empty e-mail address fields in Outlook contacts Using Outlook 0
E hot to get the email address of an outlook mail item from "on behalf of" part Outlook VBA and Custom Forms 1
S Adding a mail address/recipient type field to a form Outlook VBA and Custom Forms 1
J Using Access to obtain E-mail address Outlook VBA and Custom Forms 5
F E-MAIL ADDRESS Outlook VBA and Custom Forms 1
T Adding a CC address to a mail Outlook VBA and Custom Forms 6
L Error when exporting Sent Mail to Excel Outlook VBA and Custom Forms 6
X Run macro automatically when a mail appears in the sent folder Using Outlook 5
K How can I delete an e-mail from Outlook Using Outlook 1
L Help: set flag for sent mail to check if received an answer Outlook VBA and Custom Forms 2
A Macro Mail Alert Using Outlook 4
e_a_g_l_e_p_i MY Outlook 2021 changed the format of the shortcuts for mail, calendar etc. Using Outlook 10
Z Outlook 365 Automatically assign categories to incoming mail in a shared folder Round Robin Outlook VBA and Custom Forms 1
W Outlook 365 I am getting the "Either there is no default mail client" error when I try to send an email on excel Office 365 Using Outlook 1
D Gmail mail is being delivered to a different email inbox in Outlook App 2021 Using Outlook 2
P What is your strategy for dealing with SPAM and Junk Mail? Using Outlook 1
C Code to move mail with certain attachment name? Does Not work Outlook VBA and Custom Forms 3
T 1:1 Datatransfer from incoming mail body to customs form body Outlook VBA and Custom Forms 0
O Mail rule issue Using Outlook 3
A manual rule sends mail to wrong folder Using Outlook 5
Aussie Outlook 365 Rule runs manually but returns the error code "an unexpected error has occurred" when incoming mail arrives Using Outlook 1
D ISOmacro to extract active mail senders name and email, CC, Subject line, and filename of attachments and import them into premade excel spread sheet Outlook VBA and Custom Forms 2
Witzker Outlook 2019 Macro to answer a mail with attachments Outlook VBA and Custom Forms 2
D Outlook 2003 Mail Fails Using Outlook 1
Cathy Rhone Mail merge error message Using Outlook 1
R Sent emails show iCloud mail account not the alias Using Outlook 2
D Advanced e-Mail search on from/to contact group only searches for first 20 contacts in group Using Outlook 0
P Print attachments automatically and move the mail to an existing folder called "Ted" Outlook VBA and Custom Forms 4
P Importing other e-mail accounts into Outlook Using Outlook 1
lcarpay Stay in the mail folder pane after ctrl-1 Using Outlook 1
O Exchange Sync period only (e.g. last years mail) Using Outlook 0
F Excel VBA to move mails for outlook 365 on secondary mail account Outlook VBA and Custom Forms 1
M Convertor for Outlook Express Mail Store (.dbx) to Outlook Mail Store (.pst) Using Outlook 0

Similar threads

Back
Top