1

I'm developing a ribbon for Outlook 2013 and I need one of its buttons to show a web page inside Outlook (I mean, as it happens when you clic in a folder with an URL on it)

Any ideas of what could I do?

Thanks a lot!

repu24
  • 11
  • 2

2 Answers2

0

You can use the WebViewURL property of the Folder class which allows to set a string indicating the URL of the Web page that is assigned to a folder.

Sub SetupFolderHomePage()  
  Dim nsp As Outlook.NameSpace  
  Dim mpfInbox As Outlook.Folder  
  Dim mpfNew As Outlook.Folder 
  Set nsp = Application.GetNamespace("MAPI")  
  Set mpfInbox = nsp.GetDefaultFolder(olFolderInbox)  
  Set mpfNew = mpfInbox.Folders.Add("MyFolderHomePage")  
  mpfNew.WebViewURL = "http://www.microsoft.com"  
  mpfNew.WebViewOn = True  
End Sub

Be aware, you need to set NonDefaultStoreScript key in the windows registry to get the WebView properties working in Outlook. See You cannot add a URL to the Address box on the Home Page tab in Outlook 2007 for more information.

Also you may consider using the WebViewPane layout from ADX. The solution is based on the WebViewURL property and requires the windows registry key as well, but provides a more convinient way to set up a windows form with .net controls. See the similar forum thread for more information.

Community
  • 1
  • 1
Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
-1

You can create a form region and put there the web browser control. https://msdn.microsoft.com/en-us/library/bb386301.aspx

sdrzymala
  • 387
  • 1
  • 10
  • “While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.” – Reporter Mar 04 '15 at 12:55
  • Outlook Form Regions are for inspectors only. – Eugene Astafiev Mar 04 '15 at 13:10