User properties woe... MSG files... Office 2007

WernerVonBraun
WernerVonBraun used Ask the Experts™
on
Hello Experts. We have a system that writes User Properties to Outlook Messages. That works great as long as the message is stored in Outlook. But when the user moves the message *out* of Outlook, for example by dragging it out of Outlook and dropping it on to their desktop so it is stored there as a .MSG file, then when the message is opened the User Properties are gone.

We looked at the AllowedNamedProps key in the Registry, but either we're not setting the values correctly, or it doesn't do what we think it will do. For example:

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\AllowedNamedProps\{00020329-0000-0000-C000-000000000046}\MyLittleUserProperty with dword value Type, we tried values 0, 30, 3, 48 (which is HEX 30), none of it makes the slightest bit of difference. MyLittleUserProperty is supposed to be a String value.

We also looked at:
http://support.microsoft.com/kb/907985

and tried the suggestion under re-enabling the ability to create user properties ("not recommended") - but it already says there that it doesn't work for Office 2007 and indeed it seemed to make NO difference whatsoever.


Now, the User Properties are set and queried in an Outlook Addin that we wrote, so finally a possible solution might be to check in the Outlook Addin (this is where VB developers may be of help) whether the item that just got opened is an item that resides in Outlook itself or whether it's an MSG file that the user clicked on or that got launched in some way or other.

Now this is the REALLY bizarre thing: I cannot find anything - ANYTHING - in the Outlook Addin that will allow me to determine where the message came from. I looked at the Explorer object and ... nothing. The Inspector object ... nothing. Ultimately both of them lead me to a MailItem type object and it seems to think that the item resides in the Inbox, even if it was launched by double-clicking on an MSG file. There is nothing like a "path" property on the MailItem Object, nothing that tells me where it came from. Or is there?



Prrrrwlllleeeeeeazzzze help
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Quality Lead Engineer
Top Expert 2011
Commented:
How about checking teh items entryid.  If it is opened from eoutlook then it will be non blank, (assuming it is saved and not a new item) whereas a message from the .msg files will have an empty string.

Chris

Author

Commented:
lemmegocheckso..... brb
Chris BottomleySoftware Quality Lead Engineer
Top Expert 2011

Commented:
BTW should have commented, yes the user properties arte outlook specific so lost outside of the app.

Chris
Should you be charging more for IT Services?

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Yeah. Obviously it *could* be a new item (or a reply or whatnot), so I had to add another test. Like you suggested I checked that the EntryID be blank, which worked a treat. And then to ensure that I was looking at a saved .MSG file I also check the .Sent property, and if that's True I know I'm in business.

Cheers

Author

Commented:
Nice one
Chris BottomleySoftware Quality Lead Engineer
Top Expert 2011

Commented:
Glad it helped

Chris

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial