Editing custom fields

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
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.
 
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?
 
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
 
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
 
Back
Top