'Description Add a column to the current View in Outlook 2002, via XML ' 'Changes ' JL - 10/09/2001 Created ' ' 'Called on by Contactor to add a ClientID column to mail items scanned. ' ' 'An XML DomDocument is not created as a wrapper for the XML string, because that would add 'required references to the project. This code simply does string manipulation. Option Explicit Sub AddColumnToView() Dim strXMLView As String Dim strXMLCol As String Dim objView As Outlook.View Dim intPos As Integer Set objView = Outlook.ActiveExplorer.CurrentView strXMLView = objView.XML intPos = InStr(strXMLView, "") - 1 ‘ add before first column strXMLCol = "" & _ "ClientID" & _ "http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/ClientID" & _ "string" & _ "45" & _ "" & _ "" strXMLView = Left(strXMLView, intPos) + strXMLCol + Right(strXMLView, Len(strXMLView) - intPos) objView.XML = strXMLView MsgBox objView.XML End Sub