How can I insert a fixed date in a CALC footer

I have various CALC files with footers incorporating a date field to show revision/update/release date. The date field available in the footer automatically updates when a document is opened. Is there a way (other than entering a date as text) to reference the most recent file SAVE date, instead of today’s date? As a workaround I export the files to PDF and print the “fixed date” copies, but if I inadvertently open/print the calc file I get the current date rather than the release date (causing colleagues viewing my hard copies to believe data is current when in actuality the data may be weeks old).

It must be possible using a macro, but not via the menu (I had a quick search for the location in the object tree but was unsuccessful).

Hi

You can use a macro like:

sub PysUpDateFooter

dim oDoc as object, oStyle as object, oFooter as object

oDoc = thisComponent

if oDoc.haslocation then    
	oStyle = oDoc.StyleFamilies.getByName("PageStyles").getByName("Default")
	
'	oFooter = oStyle.LeftPageFooterContent'
	oFooter = oStyle.RightPageFooterContent
	
	oFooter.LeftText.String = FileDateTime(thiscomponent.url)
'	oFooter.CenterText.String = FileDateTime(thiscomponent.url)'
'	oFooter.RightText.String = FileDateTime(thiscomponent.url)'
	
	oStyle.RightPageFooterContent = oFooter
end if    

end sub

(Un)comment as needed (left/right page, left/center/right area)
Example: UpdateFooter.ods

Regards