|
|
|||
| Outlook Expert Techniques Printer Friendly Version | |||
|
|
Working with toolbars, menus, ribbon; generating custom reports; deploying forms; connecting to databases, Exchange folders, and XML Web services | ||
| Topic | |||
|
|
View.XML Documentation?
Does anyone know a good place to find documentation on the XML that comes out of View.XML? I can't figure out how to set the prop element to link it to a UserProperty. The code source shows what I've been trying. If I put in the Microsoft URI for ReminderSet, it actually works. Thanks for any help! ... public void RandomFunction() { ViewColumn column = null; .... if (column == null) { column = new ViewColumn() { Name = cActivityLogViewColumnName, Heading = cActivityLogViewColumnName, Editable = false, Width = 18, DisplayFormat = 3, Bitmap = true, Type = ViewColumn.ViewColumnType.boolean, Style = "padding-left:3px;;text-align:center", Property = "http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8503000b" }; } ViewManager.Default.AddColumn(view, column, 0); } ... public class ViewManager { public void AddColumn(View view, ViewColumn column, int columnIndex) { var xmlDoc = new XmlDocument(); xmlDoc.LoadXml(view.XML); ... viewNode.AppendChild(column.ToXmlNode(xmlDoc)); ... view.XML = xmlDoc.InnerXml; } } Adam 09-Nov-2009 14:51 |
||
|
|
Sue Mosher
09-Nov-2009 15:26
Easiest way to see that for yourself is to add the custom property to the view and then look at the <column> element for that property. You can also see the schema name for the property in the SQL tab of the Filter dialog, if you use it to filter a view, and, of course, with the Outlook Spy tool. |
||
|
|
Sue Mosher
09-Nov-2009 15:29
You might also find this reference helpful: http://msdn.microsoft.com/en-us/library/bb147567.aspx |
||
|
|
Adam
09-Nov-2009 15:32
Both comments are EXTREMELY helpful. Thank you very much! If I look in OutlookSpy and see <prop>http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/MyUserPropertyName</prop> Is that a string I can copy and paste and distribute and will work anywhere? Or do I have to determine the Guid somehow? Thanks again! |
||
|
|
Sue Mosher
09-Nov-2009 15:56
The GUID for custom properties created with UserProperties.Add or ItemProperties.Add is always the same. |
||
|
|
Adam
09-Nov-2009 15:58
Awesome, thanks a lot! |
||
|
|
|||
| Post a new message to this topic. |
