Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8159217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:50:22+00:00 2026-06-06T17:50:22+00:00

I am working on a VSTO Excel 2010 Macro Enabled Template Project, that I

  • 0

I am working on a VSTO Excel 2010 Macro Enabled Template Project, that I plan to packaged with various other file/content/resources and installed (WiX toolset) onto the target machine.

It is intended that the user will click on a shortcut (e.g. from desktop) to the Excel Template, fire up Excel with the add-ins and then work from there. I also have some dotx reports in the installation directory that is to be triggered by VSTO Ribbon Button.

Question is, how can I find out the installation directory from the VSTO Ribbon button?

Since the new Excel Workbook came from an Excel Template, would be good if there is something like ThisWorkbook.Template.Path.

EDIT: I realize there are two parts to this question, the first part is answered here while the second needs clarification:

Suppose I have a template document mytemplate.xltm in C:\templates. I then double click on the file to open up Excel and a “New Workbook” is created by default from the file. Now how can I get back the path “C:\templates” from the “New Workbook”? I want to know where the file mytemplatex.xltm or better still, which file produced “New Workbook” from.

The answer to this question should give me “C\templates\mytemplate.xltm” in C# VSTO/Interop. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T17:50:23+00:00Added an answer on June 6, 2026 at 5:50 pm
    InstallLocation = Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a VSTO project using excel 2010 and visual studio 2010.
I am working on a C# Excel VSTO add-in that utilizes the user32.dll to
I am working on a VSTO Excel project and I am having some troubles
I'm working on an Excel Addin (VSTO) in .NET that connects to an Oracle
I am working on C# VSTO(excel). I have created excel workbook project. I have
I'm working on an Excel 2010 VSTO solution (doing code-behind for an Excel workbook
Working with Sharepoint 2010, I have a class that inherits SPPersistedObject with various settings:
I am working on a project which uses Word automation through VSTO add-ins and
I am currently working on a project to convert a number of Excel VBA
I'm working on a VSTO Outlook 2007 add-in that basically synchronizes Outlook data with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.