In LO Writer, I can insert a Modification Date field by clicking Insert>Field>More Fields… or hitting Ctrl+F2, going to the ‘DocInformation’ tab, Selecting ‘Modified’ under ‘Type’ and ‘Date’ under ‘Select’, and hitting “Insert”. If I want to do this using a macro, I know that generally, the approach for inserting fields is to create the field using Dim oField As Object : oField = oDoc.createInstance("com.sun.star.text..."), but for a Modification Date field, I’m not sure what the rest of that is. I’ve seen mentions of ...DocInfo.ModificationDate and ...DocInfo.ChangeDate, but both of those cause a “ServiceNotRegisteredException”. How do I do this?
I know it’s really dated, but I’m kind of married to my current version:
Version: 7.5.7.1 (X86_64) / LibreOffice Community
Build ID: 47eb0cf7efbacdee9b19ae25d6752381ede23126
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded