Insert file name in word footer code#
If the document has never been saved, a code will be inserted. 3.On the Header & Footer Tools Design tab, in the Insertgroup, click Document Info and then click File ALT (or F10, or press F6 until the. Option Explicit Function ReportTypeC () Dim wdApp As Word.Application Set wdApp CreateObject ('Word.Application') wdApp.Visible True wdSeekCurrentPageFooter Selection.TypeText. While this works well enough, I was disappointed to find out that only the filename is inserted, not the path-so if you’ve got several versions of a document, all with similar or identical names but saved in different locations, the filename alone isn’t of much help. You can also insert the path and filename of the active document into a header or footer. Here is your function for write document name in footer that you can extend for what your need. To add the filename in Pages ’09 (this feature doesn’t exist in previous versions of Pages), select Insert -> Filename the filename will be inserted at the current cursor location. Microsoft Word has had this ability (via the Autotext feature) for a long time, and now Pages has it, too.
![insert file name in word footer insert file name in word footer](https://www.howtogeek.com/wp-content/uploads/2015/05/00_lead_image_file_name_in_header.png)
![insert file name in word footer insert file name in word footer](https://cdn.extendoffice.com/images/stories/doc-word/insert-path/doc-insert-path5.png)
Insert file name in word footer update#
That way, if I was in a meeting and someone stuck a sheet of paper in front of me and asked “can you update this document with the changes I’ve indicated here?,” I wouldn’t have to spend 15 minutes digging through my hard drive to find that particular file. Why might you want to do this? Before my Macworld days, I’d include this information (along with the path to the file) in the footer of every file I created for my job, so I always knew what printout came from which file. Pages ’09 is the ability to insert the current document’s filename as a variable in your document.