-------- Original Message  --------
From: [email protected]
To: [email protected]
Date: Fri, 20 Jul 2012 20:33:27 -0500

> On 07/20/12 02:16, Dave Barton wrote:
>> -------- Original Message  --------
>> From: [email protected]
>> To: [email protected]
>> Date: Thu, 19 Jul 2012 16:48:53 -0500
>>
>>> I'd like to create a macro for a user-defined date format (H:MMa/p).  As
>>> examples, 7:00 AM would display as 7:00a and 3:33 PM as 3:33p.  I can
>>> create the format manually, but I understand the LibreOffice format
>>> can't save user-defined formats.  So my thought is to create a macro
>>> which creates the format each time the spreadsheet is opened.  The
>>> user-defined Format Code is for a saved Style.
>>>
>>> The macro records without incident and the date format is correct.
>>> However, running the saved macro doesn't change the format.  It seems
>>> this should work.  Thoughts?  The recorded macro is as follows:
>>>
8<-- code snip for brevity -->8
>> Sorry I can't help with your macro, but I like your idea.
>> An alternative approach I use, is to add my user defined date format to
>> my Calc default template.
>>
>> Dave
>>
>>
> Thank you for responding; I admire your style. I manually changed the
> date format of my spreadsheet, saved , then coded it as the default
> template. The default template took, but unfortunately, again the
> user-defined date format wasn't saved.
> 
> 
> Do I understand you can save a user-defined date format in the default
> template and it takes? I'm sure a macro would work and I can wade
> through the code, but if there's an easier way I'm interested.

I am not sure what you mean by "coded it as the default  template".
If you follow this procedure:
http://user.services.openoffice.org/en/forum/viewtopic.php?t=1161
the ".ots" (Calc template) file will include your date format, as would
be the case for any ODF file.
I am sending you (off-list) an example template which has a DD.MM.YYYY
date format, which is not included in standard list of date formats.
Open it and you will find 31.12.1999 at the end of the Format => Date ->
Category format list.

HTH

Dave


-- 
For unsubscribe instructions e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to