View.XML Property

Returns or sets a String (string in C#) value that specifies the XML definition of the current view. Read/write.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
<DispIdAttribute()> _
Property XML As String
    Get
    Set
'Usage
Dim instance As View
Dim value As String

value = instance.XML

instance.XML = value
[DispIdAttribute()]
string XML { get; set; }

Property Value

Type: System.String

Remarks

The XML definition describes the view type by using a series of tags and keywords corresponding to various properties of the view itself. When the view is created, the XML definition is parsed to render the settings for the new view.

To determine how the XML should be structured when creating views, you can create a view by using the Outlook user interface and then you can retrieve the XML property for that view.

To programmatically add a custom field to a view, use the Add(String) method. This is the recommended way to dynamically change the view over setting the View.XML property.

See Also

Reference

View Interface

View Members

Microsoft.Office.Interop.Outlook Namespace