?
Solved

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

Posted on 2012-03-13
10
Medium Priority
?
1,286 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
[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
  • 3
  • 2
  • 2
10 Comments
 

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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
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 2000 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

771 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