Outlook custom properties

M

Mcafe

Hi,

Anyone know how to add custom properties into Outlook [msg file] from macro?
I already try some solution provided but still not able to solve this problem.

This are the example code from "http://support.microsoft.com/kb/907985 "

Set myProp = myItem.UserProperties.Add("MyPropName", olText)


I hope someone can help me on this problem. Thank You.

Sorry if someone post this solution before.

Regards,
MC
 
S

SvenC

Hi Mcafe,
Anyone know how to add custom properties into Outlook [msg file] from
macro?
I already try some solution provided but still not able to solve this
problem.

This are the example code from "http://support.microsoft.com/kb/907985 "

Set myProp = myItem.UserProperties.Add("MyPropName", olText)

What exactly is your problem? You do not assign a value, is that intended?

myProp.Value = "Hello World"
myItem.Save
 
M

Mcafe

I already assign the value, the custom properties still blank.

SvenC said:
Hi Mcafe,
Anyone know how to add custom properties into Outlook [msg file] from
macro?
I already try some solution provided but still not able to solve this
problem.

This are the example code from "http://support.microsoft.com/kb/907985 "

Set myProp = myItem.UserProperties.Add("MyPropName", olText)

What exactly is your problem? You do not assign a value, is that intended?

myProp.Value = "Hello World"
myItem.Save
 
M

Mcafe

Hi,

is standalone MSG file.


Dmitry Streblechenko said:
Do you mean a message in one of the Outlook folders or a standalone MSG
file?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
Mcafe said:
Hi,

Anyone know how to add custom properties into Outlook [msg file] from
macro?
I already try some solution provided but still not able to solve this
problem.

This are the example code from "http://support.microsoft.com/kb/907985 "

Set myProp = myItem.UserProperties.Add("MyPropName", olText)


I hope someone can help me on this problem. Thank You.

Sorry if someone post this solution before.

Regards,
MC
 
D

Dmitry Streblechenko

What exactly does not work? If you are using Outlook 2007, use
Namespace.OpenSharedItem to open the MSG file.
If you are using and older version of Outlook, you can use <plug> Redemption
(url) below - use rDOSession.GetMessageFromMsgFile; see
http://www.dimastr.com/redemption/rdo/rdosession.htm </plug>
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
Mcafe said:
Hi,

is standalone MSG file.


Dmitry Streblechenko said:
Do you mean a message in one of the Outlook folders or a standalone MSG
file?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
Mcafe said:
Hi,

Anyone know how to add custom properties into Outlook [msg file] from
macro?
I already try some solution provided but still not able to solve this
problem.

This are the example code from "http://support.microsoft.com/kb/907985
"

Set myProp = myItem.UserProperties.Add("MyPropName", olText)


I hope someone can help me on this problem. Thank You.

Sorry if someone post this solution before.

Regards,
MC
 
J

Jan Hyde

Mcafe <[email protected]>'s wild thoughts were
released on Thu, 28 May 2009 17:46:01 -0700 bearing the
following fruit:
Hi,

Anyone know how to add custom properties into Outlook [msg file] from macro?
I already try some solution provided but still not able to solve this problem.

This are the example code from "http://support.microsoft.com/kb/907985 "

Set myProp = myItem.UserProperties.Add("MyPropName", olText)


I hope someone can help me on this problem. Thank You.

Sorry if someone post this solution before.

If it's office 2007 then try setting the property twice (I'm
not kidding)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top