I want to add some attributes to standalone MSG Files using VBA, I need to see them in File -> Properties -> Custom. I try to made it by code in
http://support.microsoft.com/kb/907985 but it doesn't work. My code is:
Dim myObject As MailItem
Dim olNS As Outlook.NameSpace
Set olNS = Application.Session
Set myObject = olNS.OpenSharedItem(myPath)'myPath - String with address to the file
Dim myUserProperty As Outlook.UserProperty
Set myUserProperty = myObject.UserProperties.Add("Test", olText)
myUserProperty.Value = "TestValue"
Set myObject = Nothing
Set olNS = Nothing
In some of forum's topic I found information about using API and iStorage, but I am still not sure how can I use it to resolve my problem.
If somebody can help, please answer to me. Thank you!
Moved byForrest GuoModeratorSaturday, August 18, 2012 1:36 AMnot app for Office question (From:Developing Apps for Office)