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
  • 17,407
  • 30
  • 110
  • 219

1 Answers1

0

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

Community
  • 1
  • 1
Kiru
  • 3,489
  • 1
  • 25
  • 46