1
votes
  1. Start new "Word 2013 and 2016 VSTO Template" project in Visual Studio.
  2. Use existing template "Editman.dotm".
  3. Add New Item to Project: Ribbon (Visual Designer)
  4. Add a group to the ribbon and buttons to the group.
  5. Start Debugging. The new ribbon shows up, as expected.
  6. Publish solution.
  7. Run .exe from published solution on test machine.
  8. Open Word on test machine. New Ribbon does not appear.
  9. Open Editman.dotm on test machine. Ribbon shows up.
  10. Add Editman.dotm to the Word Startup folder. Run Word, ribbon still doesn't show up.

Question: Why does the ribbon show up when I double click on Editman.dotm, but doesn't show up when I have put Editman.dotm in the Word Startup folder?

1
What is the goal here? You seem to be using a document-level project and expecting it to work like an application-level project. Do you want the ribbon changes to always be available, no matter how Word is started?Chris
Yes, that is precisely what I am looking for. I am calling VBA code in Editman.dotm from the ribbon. I want this ribbon to always be open when Word opens on the user machine. Are you saying that starting the project as a template won't work for this, that it needs to be an add-in? What is the point of a template, then?Michael Blaustein
My current thoughts are that I am doing the deployment step wrong, that simply publishing the solution and running the .exe is not the correct way to deploy, but I don't even know where to start right now.Michael Blaustein

1 Answers

1
votes

You need to create the project as a Word 2013 and 2016 VSTO Add-In. Template projects are for when you only want your changes to be present when editing documents that were created from a particular Word template (dotx or dotm). That's why you had to select a Word template when creating your project, and why it was only visible when you opened the published template.