Solved

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

Posted on 2012-03-13
10
1,239 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 41

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 41

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Read this checklist to learn more about the 15 things you should never include in an email signature.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

831 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