userproperties do not persist in msg file

M

matvdl

I have an issue - when I save an email message that has userdefined fields in
the email to a msg file - the field do not to persist in the saved msg file.

After saving the file - if I open the email from the saved version it does
not have the user defined fields available. BUT - If I copy this file to
another computer with the same version of outlook and open the msg the
userproperties are available. The same is true for the revers - if I save a
file on the other computer - the properties are available on this computer -
but if I copy the file to the computer with the issue - they are not
available.

I am not using a custom form. I have also tried to clear the forms cache by
renaming the .dat file - this did not work.

BUT - I did try and developer a custom form on the machine with the issue -
I believe that I am using the default form now - but still have this issue.

I have tried re-installing outlook with no luck
 
D

Dmitry Streblechenko

How exactly do you open the saved MSG file and verify that the user
properties do not exist?

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

matvdl

A couple of ways.

To open the msg file I open it from the desktop by double clicking the msg
file that was previously saved there. To see if the user properties are
there I can go to Tool-Forms-Design this form. Than go to "all fields" tab
and look at UserDefined fields.

The second method is via code. I have some code that attempts to read the
userproperties when the email is open - the userproperties collection is
always empty.

If I copy this msg file to another computer and check for the user
properties in exactly the same way they are there.

By the way - I am using outlook 2003.
 
D

Dmitry Streblechenko

Keep in mind that when you open an MSG file, Outlook creates a temporary
item in the default store and copies the MSG file properties there, so
double clicking on an MSG file or dragging it back to an Outlook folder ends
up doing the same thing.
The user properties are saved in the MSG file, but it looks like Outlook
does not copy them back it creates a new item from the MSG file.

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

matvdl

Dmitry,

This never used to happen - our system saves email files from outlook into a
custom file system that relate to projects that we work on. This has been
the case for many years and I have never had this issue.

Something has gone wrong with this one machine (this is the development
machine) that is causing a different behavior to other machines in the office.

The only thing that may be related to this is that I recently attempted to
create a customer form for reading emails - after some attempts I found that
this was not going to satisfy my needs. In the process I changed the default
form for reading emails by using the "Forms Administrator" for outlook. I
have followed the instructions to place this back to the IPM.Note form - but
I am concerned that this has left something un-done.

Another possible telltale sign of the issue may be when I save a oft file.
I open a message from the inbox and save this as an oft file onto the
desktop. If I than open this I get an error message indicating "The custom
form could not be opened. Outlook will use an Outlook form instead".

If I carry out the exact same actions on another machine I do not get this
error.

Somehow I think that the issue relates to custom forms.

Any suggestions?
 
D

Dmitry Streblechenko

This is new behavior: http://support.microsoft.com/kb/907985

Custom properties can also be saved in .msg files and in .oft files. If a
user opens a .msg file that has custom properties, those custom properties
are not saved to the default store when the message is saved, forwarded, and
so on. Typically, .oft files are used to back up Outlook custom forms. With
..oft files, the new behavior applies to all kinds of items. The custom form
will not open. Instead, the message will appear in the default form for that
particular item type.


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

matvdl

Thanks for the information - I have been through this document in detail and
followed the steps to clear cache etc.

The issue I have is that I have the same installation on two differant
machines - but differant behavior on these machines.

Are you able to explain why I would be getting the message when I open a oft
file?? I dont think I should be getting this error.

Matthew
 
D

Dmitry Streblechenko

I am not sure what cache has to do with this. I don't think the KB article
even mentions the word "cache".
Please read the following excerpt:

Custom properties can also be saved in .msg files and in .oft files. If a
user opens a .msg file that has custom properties, those custom properties
are not saved to the default store when the message is saved, forwarded, and
so on. Typically, .oft files are used to back up Outlook custom forms. With
..oft files, the new behavior applies to all kinds of items. The custom form
will not open. Instead, the message will appear in the default form for that
particular item type.

In summary, this change in design can cause two things to occur: . Outlook
ignores non-existing custom properties. If a custom property does not exist
in the delivery store, the property will not be created, and its value will
be lost. If the custom property already exists in the delivery store, its
value is persisted. This change applies to the following: . Internet e-mail
messages that have TNEF and their embedded messages.
. S/MIME messages.
. .msg files when you drop the .msg file into an Outlook item
window to add the file to another item. This change also applies to .msg
files when you drop the .msg file into the main Outlook window to add the
file to a folder or in the Microsoft Word window when you use Word as the
e-mail editor.
. .msg files that a user double-clicks or right-clicks to open.

. Outlook ignores the one-off form definition. If a one-off form
specifies a custom property and that custom property does not exist in the
delivery store, the one-off form is not rendered. Instead, the user will see
the default form for that particular item type. This change applies to
Internet e-mail messages that contain a one-off form definition that is
encapsulated in TNEF. This change also applies to .oft files that a user
double-clicks or right-clicks to open.


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

matvdl

the cache was actuall in a different artical.

I have read this a number of times and I do find it all a little concerning.
Basicly it indicates that there are circumstances where the custom
properties will not be persisted. But the artical does not appear to
indicate that they are saved with the message.

"Custom properties can also be saved in .msg files and in .oft files. If a
user opens a .msg file that has custom properties, those custom properties
are not saved to the default store when the message is saved, forwarded, and
so on."

I am not forwarding saving or so on the message - all I want to do is open
the email and view the custom properties within the email. I am not using a
custom form or anything like that.

A Question:
Should I be able to open an email from the inbox that has a user defined
property - save the email to the desk-top - close the email - go to the email
on the desktop and open this version of the email - view the custom
properties on this email?

From my reading this should work.

Matthew
 
D

Dmitry Streblechenko

When you open an MSG file from the Windows Explorer, Outlook creates a
temporary message in the default profile store and copies the MSG file
contents to that message. At this point, as the KB article indicates, the
custome properties are skipped.

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

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