Solved

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

Posted on 2012-03-13
10
1,204 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
Comment Utility
0
 

Author Comment

by:TCBailey
Comment Utility
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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 41

Expert Comment

by:dlmille
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Learn more about how the humble email signature can be used as more than just an electronic business card. When used correctly, a signature can easily be tailored for different purposes by different departments within an organization.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

763 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

14 Experts available now in Live!

Get 1:1 Help Now