?
Solved

VSTO add-in works in all Office apps except Outlook

Posted on 2010-09-03
8
Medium Priority
?
678 Views
Last Modified: 2013-11-10
Hi

I am currently working on creating an add-in for Outlook 2010. I am using VS.NET 2010 and chose the Outlook 2010 add-in.

I proceeded to add a ribbon control and added the tab with a couple of buttons. When debugging the tab does not show at all.

I did exactly the same for a Word add-in and it showed immediately after Word loaded.

Am I missing an option somewhere in Outlook? Is this a known issue?

Please advise me on possible ways to fix this.

Thank you
0
Comment
Question by:culminIT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 2

Expert Comment

by:larkvale
ID: 33602448
With VSTO add-ins you can enable a couple of environment variables which will possibly help by providing more info on the problem see instructions below

Also check if the registry key LoadBehaviour is set to anything other than "3", is fo, change it back to "3"
the key is under HKEY_CurrentUser\Software\Microsoft\Office\Outlook\Addins\your add in

I have also found that you need to close down Outlook completely before it will pick up any new addins - check that you dont have OUTLOOK.EXE running in the Processes tab in Task Manager

If nothing works, you can add trace statements in your add-in startup code to see how far it gets


Setting Environment Variables :-

Go to Control Panel / System / Advanced / Environment Variables / System Variables section

Add New
      VSTO_LOGALERTS = 1

      this will add to a log file in the add-in install folder (manifest file name .log)

Add New
      VSTO_SUPPRESSDISPLAYALERTS=0

      this will display the problem on the screen

0
 

Author Comment

by:culminIT
ID: 33624824
Hi

Sorry for the delay. All of these things seem to be in place. There are no alerts either when I start up outlook (if I am doing it correctly). The add-in is loaded into outlook. I have checked that as well.

This is rather strange behaviour seeing as it even works in debug mode with a word add-in, but not outlook. I have tested this is on two different machines that use Outlook 2010.

Any other ideas on what the issue might be?

Thank you
0
 
LVL 2

Expert Comment

by:larkvale
ID: 33625868

Did VSTO_LOGALERTS = 1 not create a log file in your add-in folder ?

Are you able to put trace statements or even message boxes in various points in your add-in startup code to see how far it gets ? does it even get to the startup or not ?

Are you catching exceptions in the startup code ? I would wrap it with a try/ catch and see if it throws any problems




0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

Author Comment

by:culminIT
ID: 33626066
The custom ribbon tab is supposed to show up without you having to d anything in the startup code. All of the examples I have seen do it in this manner. I also did it like this and it works, just not for outlook.

It did not create the log file no. When starting up outlook, it even shows that the add-in is being loaded (on the splash screen)

I set the variable to VSTO_LOGALERTS and the value to 1. Is this correct?

Thanks
0
 
LVL 2

Expert Comment

by:larkvale
ID: 33634028
OK I cant tell what else could be going wrong. If you can upload your project I will be happy to take a look for you
0
 

Author Comment

by:culminIT
ID: 33644133
Hi

Here is the example. Hope it works. I had to cut out a couple of files due very restrictive rules for file uploading.

Thank you

OutlookAddIn1.zip
0
 
LVL 2

Accepted Solution

by:
larkvale earned 1000 total points
ID: 33652783

The RibbonType property on your Ribbon1 object needs to be set correctly

This property spceifies which Outlook windows will show your add-in

I changed it to "Microsoft.Outlook.Explorer" and it made your add-in appear

If it still doesn't show try setting this property different / multiple values and try it again
0
 

Author Closing Comment

by:culminIT
ID: 33660052
Thanks
0

Featured Post

Quick Cloud Training

Looking for some quick training on the cloud in 2 hours or less? Check out these how-to guides in AWS, Linux, OpenStack, Azure, and more!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Mailbox Overload?
This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question