Editing custom fields

G

Guest

Hi,
I can change custom fields in the outlook custom viewer organizer (View ->
Current View -> Define Views), but how do I do it using the VSTO?
I tried to get access to the custom fields through with
TableView.ViewFields, but then I can only change the field's format with the
ColumnFormat property.
I want to edit the value. For example, if I add new custom formula fields, I
want to initialize it when the outlook starts.

Thanks,
Alex.
 
S

Sue Mosher [MVP-Outlook]

The field value is not part of the view. It's a property of each individual item. Use the item's UserProperties collection.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

My UserProperties collection is empty.
I see the formula results in outlook but still can't access it.
I'm using Outlook 2007 and VSTO 2005 SE.
 
G

Guest

ok,
I see that with Folder.UserDefinedProperties I can see my custom fields and
view the formula with Formula property.
The problem is that the Formula property is read only and I can't change it.
Any idea on how do I initialize it?
 
S

Sue Mosher [MVP-Outlook]

A formula property calculates a value based on the value of other properties of the item. You can't change the value of formula property directly, only by changing the values of the properties it depends on -- on each individual item where you want the formula property value to change.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

As you've already apparently seen, you can't do that programmatically. EIther do that manually. Or remove the field from UserDefinedFields and add a new field by the same name, passing the formula as a parameter to the Add method.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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