Solved

Outlook won’t open an Excel spreadsheet that is VSTO enabled.

Posted on 2012-03-13
10
1,262 Views
Last Modified: 2012-11-25
I have created an Excel Add-in project (a VSTO project). The VSTO is signed with a Domain Certificate that the client machines trust. On the client machines, the add-in works well if you double click the spreadsheet or if you are in Excel and ‘File>Open’ the spreadsheet.
 
However, when the spreadsheet is sent via an email attachment, the VSTO is disabled. Excel will open and the spreadsheet is loaded but, the Add-in is disable. Excel displays this message,
This document contains code that cannot be loaded because the location is not in your trusted locations list: WrkBook.xlsx. If you trust this document you can save and open it from a location on your computer. For more information, see http://go.microsoft.com/fwlink/?LinkId=99104
.

I have looked into the link above and tried the solution that it specifies. That ‘solution’ will not work because Outlook saves attachments to a sub folder of Internet Explorer and Excel will not allow that folder to be trusted. The details of where Outlook saves attachments is documented here: http://support.microsoft.com/kb/817878.

One thing that does work but is horrendous from desktop management prespective is to move Outlook’s temp storage folder by changing the registry key HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Security. But we are talking about thousands of desktops. To have to update and maintain all those registry entries and ensure they point to valid temp folders is a disaster waiting to happen.

So, my question.
Is there some way through Windows' policies, a more trusted VSTO compile, or perhaps some other way to make Excel trust a VSTO Add-in when the spreadsheet is delivered as an Outlook attachment?
0
Comment
Question by:TCBailey
  • 3
  • 2
  • 2
10 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37717753
0
 

Author Comment

by:TCBailey
ID: 37771721
Cruiser,

I agree that a solution would be to configure a machine using group policy. I even touched on this as a portion my question, "Is there some way through Window's policies..."

Your posting points me to some general tutorials mainly related to how to run the Office Customization Tool (3) and a little Registry hacking (last one).  The registry hack is the exact solution that I stated I didn't really want to use.

I have taken considerable time looking at your links. When I looked at the 3 OCT tutorials none of them show howto use the OCT to affect the result I need. I need to be able to double click on an attachment and have excel open with the attachment enabled.

Can you explain what group policy settings could be changed in order to make this work?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37774219
I have no experience of doing the exact same thing myself. I posted those links hoping that you would be able to extract and use some information from them.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 42

Expert Comment

by:dlmille
ID: 37789459
Add c:\ and all sub folders as a trusted location ( temporarily)

Then try to see if loading from outlook works

Dave
0
 

Author Comment

by:TCBailey
ID: 37793417
Dave,

Yes, making the local disk a trusted location does work but only if I move the Outlook default location. The default location is a sub folder of IE's local browser cache. Unless I move this temp folder via the Registry setting I mentioned the C: drive trust does not work.


Trey
0
 
LVL 42

Accepted Solution

by:
dlmille earned 500 total points
ID: 37814432
Sorry about this belated response....

That's great news (that it can work, and confirms/isolates the problem, somewhat).  The article: http://support.microsoft.com/kb/817878 was useful in helping me to provide a suggestion along these same lines.  If you don't want to change registry settings, then you do need to add a folder somewhere in the tree as a trusted location.  There really are no other options as design requires the registry entry and/or trusted locations to already have been added.

Given all that, what if you just add a trusted location higher up in the tree than the Temporary file cache.  E.g., gets you via subfolders to the IE local folder (not down to the temporary folders, but a folder or so above?)

On my machine (Vista Excel 2010 - and you can see the paths in the link I posted for other OS/Office version combinations) that would be:

C:\Users\USERID\AppData\Local\Microsoft\Windows

or even as high up in this tree as comfortable?

Dave
0
 

Author Comment

by:TCBailey
ID: 37923669
Dave,

Well, it appears you are correct. "There really are no other options...".

I am going to work with our desktop deployment group to try to automate this process of registry entry deployment. That will take another week or two. If someone else doesn't jump in here with a better answer, I post my final solution and award you points at that time.

Thanks for the help,
Trey
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

733 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