Custom Views missing custom form data when deployed

T

Tomk

I am developing a solution based on Outlook 2002. I have a custom
contact form with a handful of user defined fields. I have also
created 5 custom views against this form. The views appear fine on my
machine.

I have exported the XML of the views to separate files and created
some VBA to open each XML file in turn and create the view using the
Views.Add method.
When I execute this on a test machine, the view is create properly,
however; the custom fields appear to be blank in the view.

I have compared the original XML used to generate the view and the XML
after it was created and they are identical. I can see that custom
fields are defined in the <column> node via a GUID.

Why are the fields blank in the target machine's view? If I modify
the ill-behaving view, drop the custom fields and re-add them, all is
well. The resulting XML is also fine.

Thanks.
 
S

Sue Mosher [MVP-Outlook]

You must also create the field definitions in each folder. Easiest way to do
this is to create an item in the folder, then use UserProperties.Add to add
the field to it. Default is to also add it to the folder.
 
T

Tomk

Sue,

Thanks for the reply. My follow up is that there are already existing
items in the folder. These would have the fields defined in the
folder already, correct?

When I create an item, do I need to commit the item itself or just
create it, create the fields and discard the instance of the item,
having accomplished the field creation?
 
S

Sue Mosher [MVP-Outlook]

The *items* have the fields, but not the *folder.* Only if the folder has
the proper field definitions will the fields appear in a view. See
http://www.outlookcode.com/d/fields.htm

When you're using an item just to add properties to a folder, you can
discard the item when you've completed that task.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Tomk said:
Sue,

Thanks for the reply. My follow up is that there are already existing
items in the folder. These would have the fields defined in the
folder already, correct?

When I create an item, do I need to commit the item itself or just
create it, create the fields and discard the instance of the item,
having accomplished the field creation?


"Sue Mosher [MVP-Outlook]" <[email protected]> wrote in message
You must also create the field definitions in each folder. Easiest way to do
this is to create an item in the folder, then use UserProperties.Add to add
the field to it. Default is to also add it to the folder.
 
T

Tomk

Thanks so much. It worked like a champ!


Sue Mosher said:
The *items* have the fields, but not the *folder.* Only if the folder has
the proper field definitions will the fields appear in a view. See
http://www.outlookcode.com/d/fields.htm

When you're using an item just to add properties to a folder, you can
discard the item when you've completed that task.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Tomk said:
Sue,

Thanks for the reply. My follow up is that there are already existing
items in the folder. These would have the fields defined in the
folder already, correct?

When I create an item, do I need to commit the item itself or just
create it, create the fields and discard the instance of the item,
having accomplished the field creation?


"Sue Mosher [MVP-Outlook]" <[email protected]> wrote in message
You must also create the field definitions in each folder. Easiest way to do
this is to create an item in the folder, then use UserProperties.Add to add
the field to it. Default is to also add it to the folder.

I am developing a solution based on Outlook 2002. I have a custom
contact form with a handful of user defined fields. I have also
created 5 custom views against this form. The views appear fine on my
machine.

I have exported the XML of the views to separate files and created
some VBA to open each XML file in turn and create the view using the
Views.Add method.
When I execute this on a test machine, the view is create properly,
however; the custom fields appear to be blank in the view.

I have compared the original XML used to generate the view and the XML
after it was created and they are identical. I can see that custom
fields are defined in the <column> node via a GUID.

Why are the fields blank in the target machine's view? If I modify
the ill-behaving view, drop the custom fields and re-add them, all is
well. The resulting XML is also fine.

Thanks.
 

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