none
Error while opening VSTO workbook from email RRS feed

Answers

  • Hi,

    VSTO solutions have two layer security check, one in Office itself, the other is the VSTO runtime.

    VSTO customized document has to be in trusted location, otherwise, the customization just doesn't load. I'm referring to: http://msdn.microsoft.com/en-us/library/bb157863.aspx#VisualStudioToolsForOfficeRuntime

    Workbook which opened from email are locates in temp folder, but temp folder could not be added to trusted location. So, it's impossible to open customized workbook from email.

    To share the workbook, you can just share the link of UNC path through email. \\fileserver\**\Demand_Report.xlsm Before you add the UNC path to Trusted Location, you need to enable the settings. I'm with Excel 2010.

    Please let me know if there's anything unclear, I'll try my best to assist.


    Forrest Guo | MSDN Community Support | Feedback to us


    Tuesday, January 31, 2012 9:46 AM
    Moderator
  • Hi,

    We fixed the issue using following workaround.

    Added a macro on workbook open event, to save the workboook to desktop, close the opened file and open from the desktop. With this when we open the vsto workbook from email, the macro first saves the workbook to desktop, closes the opened workbook and opens saved file in the desktop. This is transparent to the user. In this case we will not get the error since, we opened the workbook from desktop which is trusted location

    Wednesday, February 8, 2012 7:20 AM

All replies

  • Hi Haritha,

     

    Thanks for posting in the MSDN Forum.

     

    Do you save your VSTO work on the target compute? It’s based on my experience VSTO workbook will content at least 3 dll file, 1 manifest file, 1 vsto file and 1 Excel file. I’m wondering whether you have all of the files on your target machine.

     

    Have a good day,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Monday, January 23, 2012 7:40 AM
    Moderator
  • I think that one of the possibilities would be to trust (in CAS) some network location and deploy your vsto dlls there, this way you can avoid problem with sending only xlsx without needed additional files. But i have no idea if VSTOR will not also set Evidence on created domain based on fact that file is untrusted (i.e. opened from temp dir and recieved from internet). Verify my first suggestion of you can.
    Tuesday, January 24, 2012 10:47 AM
  • Hi Tom,

    The VSTO Workbook .xltm is published to network drive(and all the files you are talking about are in the network drive publish location) and all users have access to the network. Suppose, I copy the .xltm file to my machine and open it, modify it and save as .xlsm to my desktop. Later, I mail this .xlsm to the user through outlook. When user opens this file from email, with out saving to the desktop, it throws this error. If user saves it to the desktop and opens it, it is working fine. Can you please reply asap? We are facing this issue from quite some time.

     

    Thanks

    Haritha

    Wednesday, January 25, 2012 9:03 PM
  • Hi Haritha,

     

    I think we need to make user %temp% folder is in Trust Location list. Please confirm it.

     

    Have a good day,

     

    Tom

     


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Friday, January 27, 2012 7:00 AM
    Moderator
  • Hi Tom,

    We have tried doing it. It is not possible to make %temp% as trusted location. Even, if you make it as trusted location, you still will recieve the error.

    Thanks

    Haritha

     

    Tuesday, January 31, 2012 4:34 AM
  • Hi Haritha,

     

    I think I need involve some experts into this thread now. There might be some time dely. Appreciate your patience.

     

    Have a good day,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Tuesday, January 31, 2012 9:03 AM
    Moderator
  • Hi,

    VSTO solutions have two layer security check, one in Office itself, the other is the VSTO runtime.

    VSTO customized document has to be in trusted location, otherwise, the customization just doesn't load. I'm referring to: http://msdn.microsoft.com/en-us/library/bb157863.aspx#VisualStudioToolsForOfficeRuntime

    Workbook which opened from email are locates in temp folder, but temp folder could not be added to trusted location. So, it's impossible to open customized workbook from email.

    To share the workbook, you can just share the link of UNC path through email. \\fileserver\**\Demand_Report.xlsm Before you add the UNC path to Trusted Location, you need to enable the settings. I'm with Excel 2010.

    Please let me know if there's anything unclear, I'll try my best to assist.


    Forrest Guo | MSDN Community Support | Feedback to us


    Tuesday, January 31, 2012 9:46 AM
    Moderator
  • Hi,

    We fixed the issue using following workaround.

    Added a macro on workbook open event, to save the workboook to desktop, close the opened file and open from the desktop. With this when we open the vsto workbook from email, the macro first saves the workbook to desktop, closes the opened workbook and opens saved file in the desktop. This is transparent to the user. In this case we will not get the error since, we opened the workbook from desktop which is trusted location

    Wednesday, February 8, 2012 7:20 AM