XML Property
Returns or sets a value that specifies the XML definition of the current view. 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. Read/write String.
expression.XML
expression Required. An expression that returns a View object.
Example
The following example creates a new view and displays its XML definition in the Immediate Window.
Sub XMLView()
'Creates a new view and displays the XML definition
'in the immediate window
Dim olApp As Outlook.Application
Dim objViews As Views
Dim objView As View
Set olApp = Outlook.Application
Set objViews = _
olApp.GetNamespace("mapi").GetDefaultFolder(olFolderInbox).Views
Set objView = objViews.Add _
("New Table View", olTableView, olViewSaveOptionAllFoldersOfType)
Debug.Print objView.XML
End Sub
The modified properties which are visible in the following XML source code. In addition to the property definitions, the XML source also defines any objects that make up the view. The following example displays the XML definition of columns that appear in the above view.
<column>
<heading>Flag Status</heading>
<prop>http://schemas.microsoft.com/mapi/proptag/0x10900003</prop>
<type>i4</type>
<bitmap>1</bitmap>
<style>padding-left:3px;text-align:center;padding-left:3px</style>
</column>
<column>
<format>boolicon</format>
<heading>Attachment</heading>
<prop>urn:schemas:httpmail:hasattachment</prop>
<type>boolean</type>
<bitmap>1</bitmap>
<style>padding-left:3px;text-align:center;padding-left:3px</style>
<displayformat>3</displayformat>
</column>