Your requirements are not clear for me?
A FileSystemObject is something very different then a Word.Document object.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In fact it's a FileSystemObject I want to interpret as an Word.Document in VBA !
How can I do that ?
Your requirements are not clear for me?
A FileSystemObject is something very different then a Word.Document object.
OK, maybe it's not posible in VBA to 'view' one type of object as another object so I tried something else.
I have this snippet of code:
Sub prepareDoc(fn As String)
Dim WordApp As New Word.Application
Dim doc As Document
Set doc = WordApp.Documents.Open(fn) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< (A)
InsertAndUpdateFieldsInFooter doc
doc.Save
doc.Close
Set doc = Nothing
WordApp.Quit
Set WordApp = Nothing
End Sub
I know for a fact that:
The ONLY thing left now is to "open the returned file name in a hidden Word instance, do the editing of the footer, save the document and quit Word application.
I think the code above is "by the book" and it should do that ...
but the line marked (A) above wont let me do it - it starts an instanse with this dialog locking it all up:
and I CANT do something about that in the "Security center ..." - I've tried, it makes NO difference !
SOMETHING is wrong here - but what is it ?