Joined: Jan 23, 2008 Posts: 98 Location: United States
Posted: Fri Jun 13, 2008 7:23 am Post subject: calc - 'date saved' field not available?
I have a spreadhseet that must be circulated to a number of people. I want to insert the same 'modified' field that is available in Write so that people will know they are all looking at the same sheet.
NOW() might do it, but I only have to open the sheet for the date to be changed, not resave it (If I read the instructions correctly).
I can't seem to find anything in the Function list, Help file, this forum or the OO forum that covers it.
Anybody out there already done it?
Thanks
Joined: Jan 23, 2008 Posts: 98 Location: United States
Posted: Fri Jun 13, 2008 8:25 am Post subject:
Thanks. I had found that one. The important part is at the start where it says NOW() will change whenever you open the sheet, whether you change it or not.
The macro that is created seems to time an action. Again, not exactly what I want. Yes, I could 'time' my looking at the sheet, but if I close it unchanged, the time will still change.
I really want to access the date stamp used when a file is saved and show that in the sheet. In Write, I use the Modified field under DocInformation. but that screen doesn't seem to be available to calc.
But, thanks anyway.
Okay, I've got about half way with this - so far, I've created a function:
Code:
Function DOCMODSTAMP()
DOCMODSTAMP = FileDateTime(ConvertFromURL(ThisComponent.URL))
end Function
which, if saved in a basic module, enters the created/modified timestamp for the current open doc if you enter =DOCMODSTAMP() in a cell.
But there are 2 things not working so far :
i) Once assigned to a cell, the basic statement crashes with a useless error message next time you reopen the document (maybe ThisComponent.URL hasn't yet been set when the macro is run? I have no idea).
ii) Less significant but still annoying, if you save the document while you're editing it, the cell won't be updated even if you apply recalculate.
I'm going to quiz the folk over at oooforum.org and come up with solutions to both these issues, I hope, and then I'll be back with smugness
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum