1

Is it possible to check whether particular template was used for creation of the workbook?

In word I have a piece of code:

string templateUsed = document.get_AttachedTemplate().FullName;

or

var templateName = document.BuiltInDocumentProperties[Microsoft.Office.Interop.Word.WdBuiltInProperty.wdPropertyTemplate].Value.ToString();

I want to execute a piece of code if working ONLY on my template, for instance:

workbook.Theme.ThemeColorScheme.Load("PathToMyColors.xml");
dragonfly
  • 16,853
  • 29
  • 104
  • 204

1 Answers1

0

Try this Globals.ThisAddIn.Application.TemplatesPath similar question here

Community
  • 1
  • 1
Kiru
  • 3,451
  • 1
  • 22
  • 44