Updating dates automatically in Pages
Doesn't seem like Pages has a way to update a date in a document automatically. Is there?
If not, that's a pretty significant omission in my opinion.
Doesn't seem like Pages has a way to update a date in a document automatically. Is there?
If not, that's a pretty significant omission in my opinion.
Apple never intended to design Pages to compete with any other business-oriented word processing application such as MS Word that provides field codes for intra-document date locations as you describe. Use Word instead.
In addition to the cell solution that I mentioned, one can assign text strings throughout the document as placeholder text. One then uses AppleScript to replace those placeholder text strings with the particular date format needed.
For instance, I placed the text string [date] in the left footer segment on three pages. I selected [date], and from Format menu : Advanced : Define as Placeholder Text. The string now takes on a salmon colored appearance:
And when I run the appropriate AppleScript, every occurrence of the [date] string is now replaced by the current date:
code:
set date_text to "[date]" -- placeholder text string
set theTags to {} as list
set {year:y, month:m, day:d} to current date
-- January 6, 2020
set dstr to (m & space & d & ", " & y) as text
tell application "Pages"
launch
if not (exists front document) then
display alert "Pages document must be open for this script to function properly."
if it is running then quit
return
end if
tell front document
set theTags to the tag of every placeholder text whose tag is equal to date_text
repeat with i from 1 to count of theTags
set thisTag to item i of theTags
set (every placeholder text whose tag is thisTag) to dstr as text
end repeat
end tell
end tell
return
Still, simpler to use MS Word, in my estimation.
Apple never intended to design Pages to compete with any other business-oriented word processing application such as MS Word that provides field codes for intra-document date locations as you describe. Use Word instead.
In addition to the cell solution that I mentioned, one can assign text strings throughout the document as placeholder text. One then uses AppleScript to replace those placeholder text strings with the particular date format needed.
For instance, I placed the text string [date] in the left footer segment on three pages. I selected [date], and from Format menu : Advanced : Define as Placeholder Text. The string now takes on a salmon colored appearance:
And when I run the appropriate AppleScript, every occurrence of the [date] string is now replaced by the current date:
code:
set date_text to "[date]" -- placeholder text string
set theTags to {} as list
set {year:y, month:m, day:d} to current date
-- January 6, 2020
set dstr to (m & space & d & ", " & y) as text
tell application "Pages"
launch
if not (exists front document) then
display alert "Pages document must be open for this script to function properly."
if it is running then quit
return
end if
tell front document
set theTags to the tag of every placeholder text whose tag is equal to date_text
repeat with i from 1 to count of theTags
set thisTag to item i of theTags
set (every placeholder text whose tag is thisTag) to dstr as text
end repeat
end tell
end tell
return
Still, simpler to use MS Word, in my estimation.
The only means to provide for an automatically updating date is to use a borderless table cell that contains the function, now(). Use appropriate cell date/time formatting for the effect you desire. I would create a template with this single table cell positioned where you want the date to appear when you start a new document.
Real old version (over 8 years ago) had this. We all used it in our office.
When Apple made Pages as an App, they took this away.
I guess it made the program a bit smaller code-wise but that is just a guess. May other features disappeared as well. A few have been added back over the years.
I agree this would be a valuable preference, but Apple software engineers took it away.
Pls see: https://en.wikipedia.org/wiki/Pages_(word_processor)
On October 23, 2013, Apple released a redesign with Pages 5.0 and made it free for anyone with an iOS device. In this release, many templates, as well as some advanced features that were available in version 4.3, were not included. Some of these missing features were put back over the next releases but the current version (8.0, released March 28, 2019) still lacks important features from version 4.3 including mail merge, non-contiguous selection of text, advanced find/replace functions, the ability to print comments, and more.
They omitted it, as Pages v5.0 in 2013 was a complete, ground-up rewrite of the better Pages '09 application. It was not based on the Pages '09 v4.3 code pool, so the automatic date feature would have to be something that they were motivated to add to the new code — and have not for over six years.
Even Pages '09 v4.3 was intended as a consumer grade application. Of course, many chose to use it in their business for the simplicity over Word, but that still doesn't alter it from its original intended purpose.
Apple never intended to design Pages to compete with any other business-oriented word processing application . . .
???? ???????????????????
This feature (re date) was in the program. Apple software engineers took it out??? Makes NO sense.
thanks, I was afraid that's the only option, really baffles me why Pages doesn't have a simple feature that MS Word has had as long as I can remember
the cell trick is fine for a simple instance of this but imagine a document where today's date is referenced throughout (such as a legal doc or anywhere today's date needs to be referenced)
it's not a huge deal for me but if it was more important I can see easily moving over to Word just for that feature
Hi Nick,
Where is the date that you want to automatically update?
In a table cell?
In a page header or footer?
Somewhere else?
More information will lead to a solution!
Regards,
Ian.
thanks Ian, I know about the cell trick but I need this as in-line text in a bunch of places throughout the document
Updating dates automatically in Pages