Web Views

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

Web Views
Switching between regular Outlook web views and custom views 
Niel Ruben


Guest


I would like my custom form to replace all folder pane "Web Views" for all folders when my "Command Bar Button" is pressed on the toolbar. (The button will remain pressed, i.e. highlighted)

When the button is pressed again then I would like all of the views to return to normal.

I think I am going about it in a backwards way. Can someone tell me what is the best way to implement this?

Regards,
Niel
Posted 29 Jan, 2007 10:19:33 Top
Fedor Shihantsov


Guest


Hi Niel,

To replace all folders with a web view, you can select all items in the ExplorerItemTypes property. In order to apply this change to the current folder you should switch to another folder and return back ( programmatically).

There is a complexity when returning folders to the normal view.
You shoud scan all folders and rollback their WebViewOn and WebViewUrl properties. Currently, ADXOlFormsManager makes this during addin shutdown.

We plan to introduce a new method that will allow you to do this. I hope this method will be introduced this month.

Also see the topic http://www.add-in-express.com/forum/read.php?FID=5&TID=1752&MID=8043#message8043

P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 29 Jan, 2007 12:30:23 Top
Niel Ruben


Guest


I am using the following code to switch to another folder and back:

private void Refesh()
{
try
{
Outlook.MAPIFolder tempFolder = OLApplication.Session.Application.ActiveExplorer().CurrentFolder;

OLApplication.Session.Application.ActiveExplorer().CurrentFolder = OLApplication.Session.Folders.GetNext();
OLApplication.Session.Application.ActiveExplorer().CurrentFolder = tempFolder;

System.Windows.Forms.MessageBox.Show(tempFolder.Name.ToString());
}
catch (System.Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.ToString());
}
}

It does not seem to be working. It ends up always sending me to the "Outlook Today" folder.

By the way, I cannot get "Outlook Today" to return to it's original view. "Outlook Today now looks like an e-mail view.
Posted 30 Jan, 2007 11:42:47 Top
Niel Ruben


Guest


OLApplication.Session.Application.ActiveExplorer().CurrentFolder = OLApplication.Session.Folders.GetNext();
System.Windows.Forms.MessageBox.Show
(OLApplication.Session.Application.ActiveExplorer().CurrentFolder.Name.ToString());

OLApplication.Session.Application.ActiveExplorer().CurrentFolder = tempFolder;
System.Windows.Forms.MessageBox.Show(tempFolder.Name.ToString());

When I place a messagebox between these two calls (from previous post) then everything seems to work right. The messagebox introduces a delay into the code that lets it run properly. The question is what is the correct way to overcome this?
Posted 31 Jan, 2007 06:15:05 Top
Fedor Shihantsov


Guest


Niel,

By the way, I cannot get "Outlook Today" to return to it's original view. "Outlook Today now looks like an e-mail view.

Right click on Personal Folders, select Properties, open the Home Page tab and click the Restore Defaults button.

For the refreshing you can use following pseudo code:

OutlookNameSpace = OLApplication.GetNameSpace("MAPI");
OutboxFolder = OutlookNameSpace.GetDefaultFolder(4); //olFolderOutbox = 4
CurrentFolder = ActiveExplorer.CurrentFolder; 
ActiveExplorer.SelectFolder(OutboxFolder);
ActiveExplorer.SelectFolder(CurrentFolder);
Posted 31 Jan, 2007 09:08:26 Top