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
>

>
>>
 
S

Sue Mosher [MVP]

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
Aussie Outlook 365 Rule runs manually but returns the error code "an unexpected error has occurred" when incoming mail arrives Using Outlook 0
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 2
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
T vba extract data from msg file as attachment file of mail message Outlook VBA and Custom Forms 1
J E-mail held in Outbox while Minimized Using Outlook 3
G Forward email body to other mail list directly from Exchange server Exchange Server Administration 1
T Outlook creates a copie of every mail I send Using Outlook.com accounts in Outlook 4
N Please advise code received new mail Using Outlook 0
M Outlook 2010 How could I globally redesign an outlook template form/region/inspector template used to display mail lists or an individual mails? Outlook VBA and Custom Forms 0
A How to stop user form from disapearing once mail window is closed? Outlook VBA and Custom Forms 0
M Outlook, send to > mail recipient - results in plain text email Using Outlook 1
R How to Sync *all* Google Workspace Mail Folders with Outlook 2019 (MS365) Using Outlook 3
S Outlook VBA How to adapt this code for using in a different Mail Inbox Outlook VBA and Custom Forms 0
E Having some trouble with a run-a-script rule (moving mail based on file type) Outlook VBA and Custom Forms 5
S Outlook email to configure setup for each mail Outlook VBA and Custom Forms 1
L Correct E-Mail Pulling Wrong Mail Using Outlook 5
S Outlook mail adressing stops after first match in GAL Using Outlook 0

Similar threads

Top