Solved

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

Posted on 2012-03-13
10
1,224 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Outlook Free & Paid Tools
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

930 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now