How to show the last updated date in your document


Have you ever tried to tell which version of a printed document was the most recent? If you use the date field in the document header or footer, what you get is the printed date; not the date of the last update. So I can print a document that was last updated in 2004, but the date in the header or footer will show today’s date.


In the example shown in Figure 1, the last time I made a change to the “Copying a spreadsheet without truncating cells” document was 10/7/2004.




Figure 1



But this morning when I inserted a header and chose the “Author, Page#, Date” AutoText, the date shown (Figure 2) is today’s date. That’s fine, if the most important date is when the document was printed. But in this case, I want people to know the last time I updated these instructions. So, I can replace the date that is supplied by the AutoText with the date I last saved the file, which equates to the last time I made any changes to the document.




Figure 2


To do so, I replace the date in the header with the SaveDate field. Figure 3 shows how:




Figure 3


1. Place your cursor where you want the last saved date to appear in your Microsoft Office Word document. In this case, I’m putting it in the header. But you can put it anywhere in the document you like.
2. On the Insert menu, click Field.
3. Scroll down to SaveDate, and click on it.
4. Click OK.



Figure 4


The header (Figure 4) will now show the date of the last time the file was saved. If you update your document in the future, you can update the SaveDate field by clicking on it, and pressing F9.

You can use the SaveDate field anywhere in your document. So this tip might be handy in any situation where you’d like to be able to tell the last time a document was changed, for example if you’re writing a draft report, sales report, or other documents where it could be important to know the last time the document was updated.


—Robbin Young


Comments (6)

  1. Celia says:

    <P>I really liked this tip and will use it frequently. However, I couldn’t figure out a way to do the same thing in Excel. Is it possible? I have several worksheets that I update regularly and it would be very helpful to do this with these worksheets. I just found this Tip site and think it is awesome! Keep up the good work! Celia </P>

  2. MSDN Archive says:

    Celia: That’s a great question, and I wasn’t able to find an answer either. I’d love to be able to show the last updated date in any Office document… We do a lot of PowerPoints here at Microsoft, so it would be handy there too. Anyone out there know how to put the last saved date in other Microsoft Office applications? — Robbin

    P.S. Sorry for the <P> and </P> tags on your mail, Celia. I tried just answering in your comment but the minute I edit it with this blogging sofware, all the HTML tags start showing and I’ve not figured out how to fix that either. <grimace>

  3. I too need to show the last date of change in excel, which I use for price lists. So far the best I have come up with is to manually update the date as part of the file name:

    Prices Widgets 13 Oct 2005.xls

    (thank goodness for long file names, eh?)

    I also update the same date as part of the header.

  4. Sandy says:

    The easiest way to show an update/revised date in excel is to insert it into either the header or footer. Open the page setup, select header or foot and type

    Revised &[Date]. Each time you open the page it will automatically update to todays date. Enjoy!

  5. MSDN Archive says:

    Sandy: Thanks for your suggestion about adding the revised date to Excel. This will work fine as long as you do in fact make a change to the file on the day you open it. The issue I’ve run into is having today’s date entered automatically, when in fact I’ve only opened the file to print it, not to make an update. In Word, there’s a field for LastSavedDate. I’ve not found something comparable in Excel. —Robbin

  6. Bryce says:

    Here is how you can include the time that an Excel file was updated, i.e. saved. Follow these instructions to add the code

    – Hit Alt-F11, you’re now in the VBA environment.

    – Locate your file in VBA project

    – Double left click on that file name

    – Locate "ThisWorkbook" in your current file

    – Paste the code in the white window

    – Return to Excel with again Alt-F11

    You will have to modify the sheet name and range you want the date placed, but this should get you going, at least in excel.

    the code

    Private Sub Workbook_Beforesave(ByVal saveasiu As Boolean, Cancel As Boolean)

       Sheets(1).Range("A1").Value = Now

    End Sub

    Bryce