| View previous topic :: View next topic |
| Author |
Message |
kod65red Newbie

Joined: 19 Jun 2011 Posts: 3
|
Posted: Sun Jun 19, 2011 1:37 pm Post subject: Macro works in one document but creates error in others |
|
|
I am trying to create a macro to enter a custom format date quickly, like "19 June 2011" instead of "06/19/11." I'm using a macro since openoffice.org doesn't allow you to change the default format.
I've tried creating such a macro a few times, saving it in My Macros. It works well in the original document when I first create it; however, if I open another document or even save the first document, close it, and open it again, the macro malfunctions, producing a field like "40713.57" instead of a date. (When I rerecord the macro, I get slightly different numbers.) I've done similar things with a time macro and had the same problem. Any suggestions? |
|
| Back to top |
|
 |
floris_v Moderator


Joined: 12 Jul 2007 Posts: 4603 Location: Netherlands
|
|
| Back to top |
|
 |
kod65red Newbie

Joined: 19 Jun 2011 Posts: 3
|
Posted: Sun Jun 19, 2011 2:47 pm Post subject: |
|
|
| That is the same issue, for sure - it's not resolved there yet. Is that the forum I should be using, rather than this one? |
|
| Back to top |
|
 |
probe1 Moderator


Joined: 18 Aug 2004 Posts: 2465 Location: Chonburi Thailand Asia
|
Posted: Sun Jun 19, 2011 3:44 pm Post subject: |
|
|
Using a document template with a customized date field is the easiest solution.
AutoText another one.
Or a macro that sets the format... see my Extension DateTime2 _________________ Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs |
|
| Back to top |
|
 |
kod65red Newbie

Joined: 19 Jun 2011 Posts: 3
|
Posted: Sun Jun 19, 2011 10:34 pm Post subject: |
|
|
| Thanks. I think I resolved it more or less via the following work-around: a document template with a customized date field per your first suggestion. Not too elegant, since the date and time now appear at the top of every new default document, and the macros don't work in old documents until I add a custom-formatted date. If anyone knows a more elegant solution, let me know. I may try out your custom macro as well. Thanks! |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8979 Location: Lexinton, Kentucky, USA
|
|
| Back to top |
|
 |
|