Add a new View to Inbox Folder

Add-in Express™ Support Service
That's what is more important than anything else

Add a new View to Inbox Folder
 
User User




Posts: 82
Joined: 2009-08-15
Posted 17 Aug, 2009 10:00:20 Top
User User




Posts: 82
Joined: 2009-08-15
The link above contains a screenshot for my new view of outlook.

I have download the new build but when i try to install that give me a error : Fail to register ADXUtils. HResult -1073741674. What this meens?

Now, I cann?t install the build I have installed first.

Thanks.
Posted 17 Aug, 2009 13:14:57 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
User,

I have download the new build but when i try to install that give me a error : Fail to register ADXUtils. HResult -1073741674. What this meens?


I have just answered you in another thread

The link above contains a screenshot for my new view of outlook.


Could you take a complete screenshot of Outlook main window?
.NET, Extended MAPI, Windows Phone & RT
Posted 17 Aug, 2009 13:23:49 Top
User User




Posts: 82
Joined: 2009-08-15
Posted 17 Aug, 2009 17:58:35 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi User,

Thank you for providing me with screenshots.

Please have a look at the following article on our technical blog HowTo: Use the View.XML property to filter Outlook items.
.NET, Extended MAPI, Windows Phone & RT
Posted 18 Aug, 2009 07:24:50 Top
User User




Posts: 82
Joined: 2009-08-15
Hi Eugene,

http://rapidshare.com/files/268932613/MyAddin6.rar.html~

This link have a simple project, where i try to add 3 new columns to the current view. When I cacth the XML of the current view, that is modified.Can you watch what happens?

Thanks very much
Posted 18 Aug, 2009 21:25:22 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi User,

I have just tested your sample project. It looks like you modify the XML view inconsistently.
.NET, Extended MAPI, Windows Phone & RT
Posted 19 Aug, 2009 09:31:29 Top
User User




Posts: 82
Joined: 2009-08-15
I d'ont now because the XML View modify
Posted 19 Aug, 2009 10:34:28 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi User,

Sorry, but how can I help you?
.NET, Extended MAPI, Windows Phone & RT
Posted 19 Aug, 2009 10:38:49 Top
User User




Posts: 82
Joined: 2009-08-15
I just want to add the 3 new columns to the current view, I don´t now what happens for the XML of the current view modify without I do something.

Instead of changing the present, I create a new View:

....

if (ReturnIndexView("NovaVista") == -1)
{

newView = inboxFolder.Views.Add("NovaVista", Microsoft.Office.Interop.Outlook.OlViewType.olTableView, Microsoft.Office.Interop.Outlook.OlViewSaveOption.olViewSaveOptionThisFolderEveryone) as Microsoft.Office.Interop.Outlook.TableView;

IndexNovaVista = ReturnIndexView("NovaVista");
int indexVistaMsg = ReturnIndexView("Mensagens com pré-visualização automática");


newView.XML = inboxFolder.Views[indexVistaMsg].XML;

newView.ViewFields.Add(newUserPropertyArquivado);
newView.ViewFields.Add(newUserPropertyCliente);
newView.ViewFields.Add(newUserPropertyRespondido);
newView.Save();
newView.Apply();
OutlookApp.ActiveExplorer().CurrentView = newView;

....
public int ReturnIndexView(string vista)
{
Microsoft.Office.Interop.Outlook.Folder inboxFolder = OutlookApp.Session.GetDefaultFolder(OlDefaultFolders.olFolderInbox) as Microsoft.Office.Interop.Outlook.Folder;
for (int i = 1; i <= inboxFolder.Views.Count; i++)
{
if (inboxFolder.Views[i].Name == vista)
{
return IndexNovaVista = i;
}
}

if(inboxFolder != null) Marshal.ReleaseComObject(inboxFolder);
return -1;
}

But in this I i have the problem when i try to order the view.
Posted 19 Aug, 2009 11:21:35 Top