0

we have a possible customer, who would like to have a custom ribbon in ONE template, which makes it for him easier to design the text etc. This stuff should work on Office 2007, 2010 and 2013.

Since this will go to thousands of people, the easiest solution for this would be, to implement Macros, which do the Design-Stuff.

It seems to be no problem (I tested only with 2013) to create a custom ribbon and connect it to macros, it seems even to be possible to define custom Icons.

The real problem causess the Ribbon itself. Since, if I activate my custom ribbon, it's activated for all documents, I have to anyhow create a macro, which makes it visible JUST for one template.

Is this even possible, or is there a possibility to define a Ribbon per dotm? I didnt find anything about that, but what I found makes me nervous about the 2007, 2010, 2013 thing...

Or is it easier to create an Addin, which is kindahow compatible with alle 3 Versions?

Alexis Pigeon
  • 7,423
  • 11
  • 39
  • 44
Matthias Müller
  • 3,336
  • 3
  • 33
  • 65

1 Answers1

1

Use Visual Studio and start a Word Template project. You can use VB if macros are to your liking or C#.

Your future documents will have to have the template attached for the ribbon to show up, which in my experience has proven to be a pain.

Alternatively you can create an addon that handles document-open events and checks if the document looks like what you expect it to look like. Heuristics can be very tricky if you don't have very specific indicators (such as an attached template, schema or content tags)

Another suggestion, which would most likely be acceptable to users, is to write an addon that shows and hides its main ribbon tab but has a ribbon button to "activate" the document and when you click that button (on another tab) it attaches your template or assigns some other persistent indicator to the document. This addon would also check each document when opened for that indicator and automatically show the actual ribbon tab when the document is recognized.

Sten Petrov
  • 10,943
  • 1
  • 41
  • 61