P
Paulo Braz Figueiredo
Hi everyone,
I’m developing an Outlook 2003 Add-in. I need to alter a table view
(Microsoft.Office.Interop.Outlook.OlViewType.olTableView) applied over a
folder containing contacts. I’m trying to modify de XML property of the view
but the modifications don’t seem to be effective! Can anybody help me?
Anybody knows what’s happening? How can I do what I intent?
Here’s the code that I’m using to try this achive this goal:
Microsoft.Office.Interop.Outlook.MAPIFolder sent_folder;
Microsoft.Office.Interop.Outlook.MAPIFolder sent_sms_folder;
try {
sent_folder =
this.GetNamespace("MAPI").GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderSentMail);
sent_sms_folder = sent_folder.Folders["Sent SMS"];
Outlook.Views sent_sms_views = sent_sms_folder.Views;
Outlook.View sent_sms_view = sent_sms_views.Add("Sent SMS View",
Microsoft.Office.Interop.Outlook.OlViewType.olTableView,
Microsoft.Office.Interop.Outlook.OlViewSaveOption.olViewSaveOptionThisFolderEveryone);
XmlNode node;
XmlDocument sent_sms_view_xml = new XmlDocument();
sent_sms_view_xml.LoadXml(sent_sms_view.XML);
node =
sent_sms_view_xml.DocumentElement.SelectSingleNode("//view/newitemrow");
node.InnerText = "0";
node =
sent_sms_view_xml.DocumentElement.SelectSingleNode("//view/incelledit");
node.InnerText = "0";
node =
sent_sms_view_xml.DocumentElement.SelectSingleNode("/view/column/heading[text()='Full Name']");
node.InnerText = "Message";
sent_sms_view.XML = "<?xml version=\"1.0\"?>" +
sent_sms_view_xml.DocumentElement.;
} catch {}
As you can see I’m trying to change de heading of a column of a table but
there’s no modification on the view! Anybody knows where’s my error?
I’m developing an Outlook 2003 Add-in. I need to alter a table view
(Microsoft.Office.Interop.Outlook.OlViewType.olTableView) applied over a
folder containing contacts. I’m trying to modify de XML property of the view
but the modifications don’t seem to be effective! Can anybody help me?
Anybody knows what’s happening? How can I do what I intent?
Here’s the code that I’m using to try this achive this goal:
Microsoft.Office.Interop.Outlook.MAPIFolder sent_folder;
Microsoft.Office.Interop.Outlook.MAPIFolder sent_sms_folder;
try {
sent_folder =
this.GetNamespace("MAPI").GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderSentMail);
sent_sms_folder = sent_folder.Folders["Sent SMS"];
Outlook.Views sent_sms_views = sent_sms_folder.Views;
Outlook.View sent_sms_view = sent_sms_views.Add("Sent SMS View",
Microsoft.Office.Interop.Outlook.OlViewType.olTableView,
Microsoft.Office.Interop.Outlook.OlViewSaveOption.olViewSaveOptionThisFolderEveryone);
XmlNode node;
XmlDocument sent_sms_view_xml = new XmlDocument();
sent_sms_view_xml.LoadXml(sent_sms_view.XML);
node =
sent_sms_view_xml.DocumentElement.SelectSingleNode("//view/newitemrow");
node.InnerText = "0";
node =
sent_sms_view_xml.DocumentElement.SelectSingleNode("//view/incelledit");
node.InnerText = "0";
node =
sent_sms_view_xml.DocumentElement.SelectSingleNode("/view/column/heading[text()='Full Name']");
node.InnerText = "Message";
sent_sms_view.XML = "<?xml version=\"1.0\"?>" +
sent_sms_view_xml.DocumentElement.;
} catch {}
As you can see I’m trying to change de heading of a column of a table but
there’s no modification on the view! Anybody knows where’s my error?