- HOW TO INSERT FILE NAME IN WORD 2003 FOOTER PDF
- HOW TO INSERT FILE NAME IN WORD 2003 FOOTER UPDATE
- HOW TO INSERT FILE NAME IN WORD 2003 FOOTER CODE
- HOW TO INSERT FILE NAME IN WORD 2003 FOOTER MAC
Place the insertion point where the field should appearįrom the Categories scroll box, select Document Informationįrom the Field names scroll box, select FileName Inserting the FileName Fieldīy inserting the FileName field, you will create a field which will insert the document's name and location. If the following types of fields do not fit your needs, you may want to review the AutoText feature. For a description of other field options, refer to Summary of Word Fields. You can insert a field into a header or footer or you can insert the field anywhere within the document. Information such as the file name, last date saved, total number of pages, and user initials can be placed into a field in your Word document. This article is based on legacy software.
HOW TO INSERT FILE NAME IN WORD 2003 FOOTER MAC
It will then insert your file name, sans extension, into your doc, updating every time you open the file, and display the new filename.(Archives) Microsoft Word 2003: Inserting Fields Mac In the Field options, select DocVariable, and type in fname into Field Properties and then click OK. Select 'Quick Parts' in the 'Insert' tab, and click on 'Field.' ' AutoUpdate Macro which creates filename without extension and updates fieldsįname = Left(fname, Len(fname) - 5) 'removes the last five characters from the filename (.docm)įor Each aStory In ActiveDocument.StoryRanges 'updates all fields in the document when you open the fileĪfter you create this macro, simply go back to the document:
HOW TO INSERT FILE NAME IN WORD 2003 FOOTER UPDATE
This macro will check what the filename is every time you open the file and will update all the fields in which you want the filename to be seen.
HOW TO INSERT FILE NAME IN WORD 2003 FOOTER CODE
In order to have the document name automatically update in the fields, you need to add a little more code to your macro. You'll have to create this custom property in every particular document you want it in.Instead you'll have to manually change the FileBaseName property from Advanced Properties. If you rename your file this won't be reflected in your FileBaseName field.You should now have "MyTempReport" inserted as a field in your document. From "Field Properties" > "Property": Choose "FileBaseName" > OK.From "Field Names" choose "DocProperty".MS Word menu > Insert > Text > Quick Parts > Field.Insert the custom document property, FileBaseName, in your document: Type in "Name": "FileBaseName" "Value": "MyTempReport".In MS Word Menu with MyTempReport.docx open > File > Info > Properties: Click > Advanced Properties.So another workaround is to create custom property FileBaseName with a hard coded value "MyDocumentBaseName":Ĭreate the FileBaseName custom property and assign it your value: Custom propertyīut you may want to avoid associating any macro with your word document to avoid security issues (e.g. Writing a macro, as has suggested, is probably the most convenient work around. I invite you, and others visiting this post, to up-vote that suggestion. Long term: Feature requestįor the long term I've made a feature request with Microsoft at: Indeed there is no "basename only" option for the FileName field. Inserting a File Name without an Extension.Two more pages to help you with your problem (both relying on Macros.):
HOW TO INSERT FILE NAME IN WORD 2003 FOOTER PDF
Maybe you could explain some more what you want to achieve with having the filename in the document header? Are you trying to use the filename in the document header to set some PDF property during conversion? Why not use the Document Title? Do you need the original filename in the PDF later - why? Also this Macro would run once and you would need to run it again when the filename changes. ".doc" - if you safe a ".docx" the "." would be preserved. What it does is simply strip the last 4 characters of the "Filename string" e.g. Selection.InsertBefore Text:=Left(ActiveDocument.Name, Len(ActiveDocument.Name) - 4) So, either you change that setting or you need some code.Ī very simple Macro would be the following: Sub InsertCurrentFileName() To show or not to show (Shakespearean style) the extension is purely up to the Windows Explorer setting to show or hide known file extensions. Insert > QuickParts > Field > FileName is the way to go, but as you see from the screenshot below, you do not have the option to turn the file extension on or off.