I've got a problem: I've coded a little script which parses trough the directories and open all word documents. I open the documents like this:
Dim sDoc as String
Dim WdDoc as Word.Document
sDoc = "C:\Templates\document.doc"
Set WdDoc = Documents.Open(sDoc)
sAttachedTemplate = WdDoc.AttachedTemplate.FullName
This works without any problems IF the template exists. But my script should get the attached template path correctly for documents which are attached to non existing templates. The target of the script is to build a list with all documents and their attached template.
The Problem is if the template doesn't exist, it displays it correctly when I open the related dialog box via Word, but not when I try to access the path via AttachedTemplate.FullName.
If it doesn't exist, it gives me the value from the default normal.dotx of my user.
Is there a solution for this problem?