Word 207 has made a lot of things easier and you can easily insert the file path and name into the header and footer of a Word 2007 document with a number of keystrokes. However, you can create a macro to insert the path and file name anywhere in the Word document, not just the header and footer. Microsoft gives you instructions on how to create a macro, modify the shortcuts, run one, etc. I've taken their instructions and added the additional steps necessary to create this specific macro to insert the path and file name.
![File File](https://support.content.office.net/en-us/media/302fd0b7-71d5-4638-bb39-297f2f47a8c5.png)
Put information such as a file name, author, computer path, or subject into the footer of a Word document. You can also include more properties, such as the date and time, links and references. Insert the file name in a footer. Word for Office 365 Word 2019 Word 2016 Word 2013 More. Apr 15, 2011 - How to automatically insert the filename in your Word document. Insert the file name of your document in its header or footer. Add the path to the file along with the filename by choosing the “add path to filename” option.
My added information to their instructions is designated by bold, underlined text. Here's how: • On the Developer tab, in the Code group, click Record Macro. • In the Macro name box, type a name for the macro. I suggest you call this macro 'InsertPathFilename' (without the quotes) Note If you give a new macro the same name as a built-in macro in Office Word 2007, the new macro actions will replace the built-in macro. To view a list of built-in macros, on the Developer tab, in the Code group, click Macros. In the Macros in list, click Word Commands. • In the Store macro in box, click the template or document in which you want to store the macro.
Important To make your macro available in all documents, be sure to click Normal.dotm. • In the Description box, type a description of the macro. You could use “Insert Path and File name” (leave off the quotes) for the description • Do one of the following: • Begin recording To begin recording the macro without assigning it to a button on the Quick Access Toolbar or to a shortcut key, click OK. • Create a button To assign the macro to a button on the Quick Access Toolbar, do the following: • Click Button. • Under Customize Quick Access Toolbar, select the document (or all documents) for which you want to add the macro to the Quick Access Toolbar.
Important To make your macro available in all documents, be sure to click Normal.dotm. • Under Choose commands from dialog box, click the macro that you are recording, and then click Add. • To customize the button, click Modify. • Under Symbol, click the symbol that you want to use for your button. • In the Display name box, type the macro name that you want to display. • Click OK twice to begin recording the macro. The symbol that you choose is displayed in the Quick Access Toolbar.
The name that you type is displayed when you point to the symbol. • Assign a keyboard shortcut To assign the macro to a keyboard shortcut, do the following: • Click Keyboard. • In the Commands box, click the macro that you are recording. • In the Press new shortcut key box, type the key sequence that you want, such as ALT J and then click Assign. • Click Close to begin recording the macro. • Click Insert at the top of your screen; • Click Quick Parts. • Select Field at the bottom of the Quick Parts menu • In the Categories filed select Document Information.
• In the Field Names window, select FileName. • In the Field Properties to the right, select one of the options if you want all capitals, etc. • Under Field Options, check the Add path to file name box. Note When you record a macro, you can use the mouse to click commands and options, but not to select text. You must use the keyboard to select text. For more information about selecting text by using the keyboard, see. • To stop recording your actions, click Stop Recording in the Code group.
Now when you want to insert the path and file name anywhere in the document, all you need to do is to type the keyboard shortcut you assigned to this Macro and it will insert it into your document. You can find these instructions as well as instructions on changing assigned shortcuts. Brad, If you want this to appear on every new document that you open using the New command in Word 2007 (or earlier versions for that matter) you need to make the change to the Normal Template (Normal.Dotm) or in the document template for the document that you have created (you should always save things like letterhead, stationary, forms, etc. As document templates not as Word files). In Word 2007 the easiest way is to use the template to add a building block for inserting the path and file names from Microsoft at. I usually do not drop a leave a response, however I read a few of the remarks here How to Create a Word 2007 Macro to Insert the Path & File Name Anywhere in a Word Doc| Nerino Petro’s Compujurist.com. I do have a few questions for you if you tend not to mind.