_ViewFields.Add(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds the specified field to the end of the ViewFields collection for the view.
public:
Microsoft::Office::Interop::Outlook::ViewField ^ Add(System::String ^ PropertyName);
public Microsoft.Office.Interop.Outlook.ViewField Add (string PropertyName);
Public Function Add (PropertyName As String) As ViewField
Parameters
- PropertyName
- String
The name of the property to which the new object is associated. This property can be referenced by field name (displayed in the Field Chooser) or by namespace (represented by ViewXMLSchemaName).
Returns
A ViewField object that represents the new view field.
Remarks
Referencing the property in PropertyName
by its field name requires the localized name in the corresponding locale. For more information on referencing properties by namespace, see Referencing Properties by Namespace
If you are adding a custom property to the ViewFields collection, the property must exist in the UserDefinedProperties collection for the View’s parent folder.
If the property already exists in the ViewFields collection, Outlook will raise an error.
To programmatically add a custom field to a view, use the ViewFields.Add method. This is the recommended way to dynamically change the view over setting the XML property.
Certain properties cannot be added to a view using ViewFields.Add, including binary properties, computed properties, and HTML or RTF body content. For more information, see Unsupported Properties in a Table Object or Table Filter
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應