Lisa said:
as I see, there is no possibility to have filename and path
automatically inserted into the footer. Is it possible using VBA?
Hi Lisa!
This line of code:
ThisDocument.MasterPages(1).Footer.TextRange.InsertAfter
ThisDocument.Path & ThisDocument.Name
will insert the current filename and path into the footer of the first
master page of the publication. This will not update should the document
move, nor will it delete any other path that is already there.
If you preface it with the code
ThisDocument.MasterPages(1).Footer.TextRange.Delete
then the footer will be deleted first, thus avoiding having multiple
paths in the footer (but also wiping out any other custom text you have
there). You could change the first statement to include other text to
compensate for this.
If you put the code in the Document_Open event handler, then you could
make the path update each time the document is opened.