Forum Discussion
Automate adding date to report
- Jun 26, 2020
Before answering directly, I'll say that if you're in the habit of opening a previous month's report and modifying it with new data, that's a poor practice. For one thing, it risks accidentally overwriting the previous report with the new one; if you don't have reliable backups, the previous version of the document is not recoverable. The proper way to use Word is to make a template of the report -- you can do that simply by using File > Save As and changing the file type from .docx to .dotx. Then use the File > New command (or just double-click the template's icon in File Explorer) to base each new document on the template.
To make your Month and Year fields, use the Insert > Quick Parts > Field dialog to insert these two fields at the beginning of the template (or just press Ctrl+F9 to insert the field brackets, and type the text between them):
{ FILLIN "Enter month" } { FILLIN "Enter year" }
Select the two fields and insert a bookmark named Month_Year. Then press Alt+F9 once (or maybe twice) so the field codes disappear.
At each place in the template where you want the month and year to appear, insert this field:
{ REF Month_Year }
Save the template and close it.
When you create a new document based on the template, these two boxes will appear first:
When the document appears on the screen, the month and year will appear in the FILLIN fields and all the REF fields.
If you make a mistake and want to change the date, select the whole document (Ctrl+A) and update its fields (F9).
Before answering directly, I'll say that if you're in the habit of opening a previous month's report and modifying it with new data, that's a poor practice. For one thing, it risks accidentally overwriting the previous report with the new one; if you don't have reliable backups, the previous version of the document is not recoverable. The proper way to use Word is to make a template of the report -- you can do that simply by using File > Save As and changing the file type from .docx to .dotx. Then use the File > New command (or just double-click the template's icon in File Explorer) to base each new document on the template.
To make your Month and Year fields, use the Insert > Quick Parts > Field dialog to insert these two fields at the beginning of the template (or just press Ctrl+F9 to insert the field brackets, and type the text between them):
{ FILLIN "Enter month" } { FILLIN "Enter year" }
Select the two fields and insert a bookmark named Month_Year. Then press Alt+F9 once (or maybe twice) so the field codes disappear.
At each place in the template where you want the month and year to appear, insert this field:
{ REF Month_Year }
Save the template and close it.
When you create a new document based on the template, these two boxes will appear first:
When the document appears on the screen, the month and year will appear in the FILLIN fields and all the REF fields.
If you make a mistake and want to change the date, select the whole document (Ctrl+A) and update its fields (F9).