Avatar of paultran00
paultran00
Flag for United States of America asked on

In Microsoft Word 2013, If someone changes the document and saves it, I want Word to update the footer with the new date as 20190214 (format yyyymmdd).

In microsoft word 2013, there is a footer with the version date such as February 14, 2019 shown as 20190214 (format yyyymmdd).  

QUESTION: On February 15, 2019, if someone changes the document and saves it, I want Word to update the date as 20190215.
How do i create a macro that does this?
Microsoft Word

Avatar of undefined
Last Comment
Brian B

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Devin Becker

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
paultran00

ASKER
Yep, I've just found it before I read your reply.

It works BUT here's the caveat:

The document already has a date last saved as 01/12/2019.  

When I use the "quick Part" then save it for the 1st time, it inserts today's date but that is incorrect because we want to preserve the original date as 01/12/2019.

I tried to change my workstation's date to 1/12/2019, then open Word and use the "quick Part", then change my workstation's date back to normal.  BUT I don't have administrative permissions on my pc to change my workstation's date.

Therefore, do you know how to write a Word macro that does this:
create a macro that runs when a user saves the document.
This macro checks a variable to see if this is the 1st time we’re doing this then we want to leave the datestamp value alone, else set the version in the footer to today’s date and set the variable 1st time to false.
Devin Becker

So the way SaveDate works is: The last MODIFICATION date of the file. So the date will only update when a change is made, and will not if no change is made(think hitting CTRL+S without actually changing anything).

Which if you add the quick part to the file and then save, counts as a modification and thus, updates the last saved date.

You could hard copy the date into the footer for now, with a note to make the change next time the file gets modified, or classify this as a modification and input the Quick Part now.

EDIT: Macros in Office Programs are not my strong point, especially not in word, but I feel that this built in function would be more convenient for what you are trying to accomplish

Hope this helps,

Devin Becker
DevOps Associate @ EE
Brian B

It sounds like getting the correct date on the first version of the document is really the issue. After that you really do want the save date. I'd suggest just get some admin help to get the date changed like you already tried to do.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Paul Sauvé

When I use the "quick Part" then save it for the 1st time, it inserts today's date but that is incorrect because we want to preserve the original date as 01/12/2019.
this, in fact, is another field called the CreateDate which is NOT altered each time you save the document
Brian B

So what did you do to fix the issue with the initial date?