Discussion:
Invisible Item Properties on MailItems?
(too old to reply)
Wolfixx
2010-01-14 01:05:34 UTC
Permalink
Hi Guys,

I have a problem getting the the value of a ItemProperty which exists (you
can see it using OutlookSpy or displaying the column in the mail grid
(Customize current view / Fields / New Field) but I cannot get it when
iterating through the ItemProperties or UserProperties collection on the
Outlook.MailItem object.

ALTHOUGH I can overwrite the value by creating a a new property with the
same name using VBA (Outlook.MailItem.ItemProperties.Add) on that emails.
The problem is that I need to read that value.

Does Anyone have a clue?

Thanks in advance for any help
Wolfgang
Sue Mosher [MVP]
2010-01-14 01:34:16 UTC
Permalink
What happens when you try to return that property by name through
ItemProperties or UserProperties?
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
Post by Wolfixx
Hi Guys,
I have a problem getting the the value of a ItemProperty which exists (you
can see it using OutlookSpy or displaying the column in the mail grid
(Customize current view / Fields / New Field) but I cannot get it when
iterating through the ItemProperties or UserProperties collection on the
Outlook.MailItem object.
ALTHOUGH I can overwrite the value by creating a a new property with the
same name using VBA (Outlook.MailItem.ItemProperties.Add) on that emails.
The problem is that I need to read that value.
Does Anyone have a clue?
Thanks in advance for any help
Wolfgang
Wolfixx
2010-01-14 04:30:03 UTC
Permalink
I am getting a System.NullReferenceException
Post by Sue Mosher [MVP]
What happens when you try to return that property by name through
ItemProperties or UserProperties?
--
Sue Mosher, Outlook MVP
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
Post by Wolfixx
Hi Guys,
I have a problem getting the the value of a ItemProperty which exists
(you can see it using OutlookSpy or displaying the column in the mail
grid (Customize current view / Fields / New Field) but I cannot get it
when iterating through the ItemProperties or UserProperties collection on
the Outlook.MailItem object.
ALTHOUGH I can overwrite the value by creating a a new property with the
same name using VBA (Outlook.MailItem.ItemProperties.Add) on that emails.
The problem is that I need to read that value.
Does Anyone have a clue?
Thanks in advance for any help
Wolfgang
Sue Mosher [MVP]
2010-01-14 13:25:15 UTC
Permalink
Please show the relevant code snippet and state your Outlook version.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
Post by Wolfixx
I am getting a System.NullReferenceException
Post by Sue Mosher [MVP]
What happens when you try to return that property by name through
ItemProperties or UserProperties?
Post by Wolfixx
Hi Guys,
I have a problem getting the the value of a ItemProperty which exists
(you can see it using OutlookSpy or displaying the column in the mail
grid (Customize current view / Fields / New Field) but I cannot get it
when iterating through the ItemProperties or UserProperties collection
on the Outlook.MailItem object.
ALTHOUGH I can overwrite the value by creating a a new property with the
same name using VBA (Outlook.MailItem.ItemProperties.Add) on that emails.
The problem is that I need to read that value.
Does Anyone have a clue?
Thanks in advance for any help
Wolfgang
Wolfixx
2010-01-22 18:32:52 UTC
Permalink
Thanks Sue

I sorted it out. It seems that there are several custom Property which can
only be accessed by the CDO objects (Mapi.Message)
Post by Sue Mosher [MVP]
Please show the relevant code snippet and state your Outlook version.
--
Sue Mosher, Outlook MVP
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
Post by Wolfixx
I am getting a System.NullReferenceException
Post by Sue Mosher [MVP]
What happens when you try to return that property by name through
ItemProperties or UserProperties?
Post by Wolfixx
Hi Guys,
I have a problem getting the the value of a ItemProperty which exists
(you can see it using OutlookSpy or displaying the column in the mail
grid (Customize current view / Fields / New Field) but I cannot get it
when iterating through the ItemProperties or UserProperties collection
on the Outlook.MailItem object.
ALTHOUGH I can overwrite the value by creating a a new property with
the same name using VBA (Outlook.MailItem.ItemProperties.Add) on that
emails.
The problem is that I need to read that value.
Does Anyone have a clue?
Thanks in advance for any help
Wolfgang
Dmitry Streblechenko
2010-02-03 17:30:16 UTC
Permalink
If you are using Outlook 2007 or higher, you can use
MailItem.PropertyAccessor to access any MAPI property.
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
Post by Wolfixx
Thanks Sue
I sorted it out. It seems that there are several custom Property which can
only be accessed by the CDO objects (Mapi.Message)
Post by Sue Mosher [MVP]
Please show the relevant code snippet and state your Outlook version.
--
Sue Mosher, Outlook MVP
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
Post by Wolfixx
I am getting a System.NullReferenceException
Post by Sue Mosher [MVP]
What happens when you try to return that property by name through
ItemProperties or UserProperties?
Post by Wolfixx
Hi Guys,
I have a problem getting the the value of a ItemProperty which exists
(you can see it using OutlookSpy or displaying the column in the mail
grid (Customize current view / Fields / New Field) but I cannot get it
when iterating through the ItemProperties or UserProperties collection
on the Outlook.MailItem object.
ALTHOUGH I can overwrite the value by creating a a new property with
the same name using VBA (Outlook.MailItem.ItemProperties.Add) on that
emails.
The problem is that I need to read that value.
Does Anyone have a clue?
Thanks in advance for any help
Wolfgang
Loading...