Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 1st, 2012  |  syntax: None  |  size: 0.34 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Changing AttachedTemplate property of Word.Document object places previously attached template in edited state
  2. objDoc.AttachedTemplate = "C:PathToTemplatetemplate.dot"
  3.        
  4. objDoc.AttachedTemplate.Saved = True
  5.        
  6. Set OldContext = objWord.CustomizationContext
  7. objDoc.AttachedTemplate = "C:PathToTemplatetemplate.dot"
  8. OldContext.Saved = True