If you look at the list of known issues for the latest release of Add-in Express 2010, you’ll notice a specific issue I myself ran into not so long ago:
WebViewPane region cannot be used for folders if their WebViewOn and WebViewUrl properties cannot be set. Possible solution is setting the “Allow Script in shared folders” and “Allow Script in Public Folders” options in the security settings.
Now, I had this problem when I’ve added a new PST file programmatically and then try to set the WebViewPane to display on this particular folder. Here’s a screenshot of the folder properties to illustrate what I mean:
As you will notice the Browse button is disabled, so you are not even able to manually set a homepage for the folder. The solution to this problem lies within the following article from Microsoft: You cannot add a URL to the Address box on the Home Page tab in Outlook 2007
In this article, MS describes how you can disable the Do not allow folders in non-default stores to be set as folder home pages rule by using the Office System Administrative Templates or setting a value in the registry. I was curious whether such templates exist for Office 2010, and did indeed find them here.
I’m going to walk you through setting up the Administrative Templates and explore some of the other useful and interesting settings. Once you’ve finished downloading the templates extract them to a folder. Open the Local Group Policy Editor, in Windows 7. The quickest way to do this is simply to type Group Policy in the start menu search box and selecting Edit Group Policy. If you’re still using Windows XP, the process is a bit more involved: from the start menu, select Run, and type mmc. Select Add/Remove Snap-in from the File menu and click on the Add button. Add Group Policy from the list of available Snap-ins.
Once the Local Group Policy Editor is open, expand the User Configuration node and right-click on Administrative Templates and select Add/Remove Templates from the context menu:
Click the Add button and browse to the folder where you extracted the Admin templates to. In the ADM folder, under the language of your choice, in our case, en-us, and open the outlk14.adm file.
Click Close, and Expand the User Configuration node. Next, expand the Administrative Templates node, and the Classic Administrative Templates (ADM) node. You will notice a Microsoft Outlook 2010 node, and if you’ve added any other Office applications’ template a note for that application as well:
In the above example, I’ve also added the templates for Excel 2010. In order to fix the issue I’ve mentioned in the start of this post, you need to navigate to Microsoft Outlook 2010>Outlook Options >Other >Advanced and double-click on the Do not allow folders in non-default stores to be set as folder home pages setting. Select the Disable radio button and click OK. Restart your Outlook and view the PST file’s folder properties again:
Voila! You’ll notice that the Address textbox and Browse buttons have become enabled and the Add-in Express WebviewPane will also now work perfectly.
Before I wrap up this post, I would like to urge you to have a long look at all the possible settings available in the Admin templates. In the download, Microsoft has kindly provided a hefty Excel file detailing all the available settings and their corresponding registry settings.
This can come in very handy when deploying your add-in, for example the above mentioned issue was solved, but it took a lot of manual doing to get it to work, you would not want your user to go through the same process. An easy solution to this is to programmatically change the setting in the registry. The key for the above issue will be: Software\Policies\Microsoft\Office\14.0\Outlook\Security and the value NonDefaultStoreScript.
There is wealth of useful settings in that file, one setting I am definitely planning to use in future is Add new categories, which you can find under Microsoft Outlook 2010>Miscellaneous. The registry key will be: Software\Policies\Microsoft\Office\14.0\Outlook\Preferences and the Value NewCategories. In here you can specify a list of new comma or semicolon delimited categories and the list will be added to the existing list of categories available in Outlook.
These are just two examples of how you can make the Admin Templates work for you, go ahead and explore the rest! Thank you for reading. Until next time, keep coding.