L
leslie.mcgann
Hello,
I'm trying to write some VB code that pulls all of the control and
field information out of an .oft file. The issue I'm having is that I
would like to get at the DisplayFormat property of a field
(UserProperty) that belongs to the item represented by the .oft (i.e.,
MailItem, PostItem).
The .oft was created by someone at a different organization, so when
my code calls CreateItemFromTemplate, I am unable to create the item
in the folder where the UserDefinedProperties (folder fields) context
would be available. I noticed that you can access the DisplayFormat
via the UserDefinedProperty interface for a field that has been added
to a folder, *BUT* it does not appear to be possible to get the
DisplayFormat for a field (UserProperty) that only has the context of
the item.
I did a test where I created a field in the Outlook 2007 form
designer, chose a type of numeric and a display format, and bound it
to a control on a form. Then I deleted the field from the folder
fields so that it was only stored in the item. I ran the form and the
display format was still applied, even though the field now only
resides within the item. So, it seems that the DisplayFormat info
must still be stored somewhere at the item level, even though the
field has been deleted from the folder level (UserDefinedProperties).
The question is, is there a way to access the DisplayFormat info for
an item field (UserProperty) programmatically?
Thanks,
Leslie McGann-Sturgeon
I'm trying to write some VB code that pulls all of the control and
field information out of an .oft file. The issue I'm having is that I
would like to get at the DisplayFormat property of a field
(UserProperty) that belongs to the item represented by the .oft (i.e.,
MailItem, PostItem).
The .oft was created by someone at a different organization, so when
my code calls CreateItemFromTemplate, I am unable to create the item
in the folder where the UserDefinedProperties (folder fields) context
would be available. I noticed that you can access the DisplayFormat
via the UserDefinedProperty interface for a field that has been added
to a folder, *BUT* it does not appear to be possible to get the
DisplayFormat for a field (UserProperty) that only has the context of
the item.
I did a test where I created a field in the Outlook 2007 form
designer, chose a type of numeric and a display format, and bound it
to a control on a form. Then I deleted the field from the folder
fields so that it was only stored in the item. I ran the form and the
display format was still applied, even though the field now only
resides within the item. So, it seems that the DisplayFormat info
must still be stored somewhere at the item level, even though the
field has been deleted from the folder level (UserDefinedProperties).
The question is, is there a way to access the DisplayFormat info for
an item field (UserProperty) programmatically?
Thanks,
Leslie McGann-Sturgeon