how to retrieve the name of an attached template via VBA when the template path has changed -


i keep template files working in dropbox , when change computer different dropbox path, template needs re-attached document. macro.

i can still see name of attached template in "templates , add-ins" window, information must somewhere stored within document.

if try retrieve name of attached template via vba writing

strtemplate = activedocument.attachedtemplate 

the result "normal.dotm" , not "mytemplate.dotm", makes lot of sense, isn't looking for.

is there way retrieve name , path of attached template?

i think can ful name (path+name)

application.dialogs(wddialogtoolstemplates).template

and name alone from

activedocument.builtinproperties(wdpropertytemplate)

the first time tried first of those, didn't seem work, have been checking wrong document. won't find template property documented under dialog object - it's documented here

if not work, other ways can see be

a. inside .docx while closed (for .docx), or maybe (i haven't checked) use dsofile.dll .doc, or

b. insert field { template \p }, execute , retrieve result text


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -