Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Recording macros for date
Recording macros for date
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
dndrich
Operator


Joined: Jan 03, 2007
Posts: 43

PostPosted: Wed Jul 11, 2007 3:44 pm    Post subject: Recording macros for date

OK, I am trying to record a macro in Writer, since I am not a coding type. Here is what I am doing:

I start record macro. I then enter "control-F2" to open insert field. I click on date (fixed), I then click on the format I want, insert, close. I then stop the macro recording, name and save it. When I run it, it fails and errors out. Why?

Daniel
Back to top
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Wed Jul 11, 2007 4:01 pm    Post subject:

What is the exact messge of the error?

I just tried to replicate your process, and it works fine for me. The only thing I know I did different is that I had to click on the "Document" tab in the Insert Fields window to get to Date(fixed).

What version and patch are you at with NeoOffice? (i.e., I use NeoOffice 2.1, patch 7).

What Mac OS are you using? PPC or Intel?
Back to top
dndrich
Operator


Joined: Jan 03, 2007
Posts: 43

PostPosted: Thu Jul 12, 2007 8:03 am    Post subject:

I am running NeoOffice 2.1 with patch 7. If I record the macro as described, it works fine in that document. But when I close the document, open a new document, and try the macro, it returns a number, not the date. The number looks like it must be the computer value for the date. It is 39275.34. Now, interestingly, when I try to cut and paste that field number into this post, here is what happens:

Thursday, July 12, 2007

So, it returns the correct format in this post, but not in the document!

Daniel
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Thu Jul 12, 2007 8:59 am    Post subject:

Is there any way to format the field as a date (like you do in Calc to turn that number into a date automatically)?

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
jgd
Agent Smith


Joined: Feb 27, 2005
Posts: 1531
Location: France

PostPosted: Thu Jul 12, 2007 9:44 am    Post subject:

sardisson wrote:
Is there any way to format the field as a date (like you do in Calc to turn that number into a date automatically)?

Smokey

I don't think so. The same behavior appears in OOo 2.1.
Thus it looks like an OOo bug.

Jacqueline
Back to top
Lorinda
Captain Mifune


Joined: Jun 20, 2006
Posts: 2051
Location: Midwest, USA

PostPosted: Thu Jul 12, 2007 11:06 am    Post subject:

The problem is that the field is already set to Date and a particular format...it just doesn't show up this way. (I'm seeing the same effect).

I'm wondering if it is related to OpenOffice.org issue 78816.

That bug (which I reported) involves using Input Fields related to User fields formatted as dates, but the effects are very similar.


There is a partial work around, though. You can go to Tools>Customize>Keyboard and assign a keyboard shortcut for Insert>Date. That will insert a fixed date. Not sure if it will be in the format you want, but you can always right click on control click on the field, choose "fields..." from the contextual menu, and shift the formatting.

Lorinda
Back to top
dndrich
Operator


Joined: Jan 03, 2007
Posts: 43

PostPosted: Thu Jul 12, 2007 1:38 pm    Post subject:

Interesting. Well, the idea was to have a simple macro to just put in the correct format. Oh, well. I'll just live with this little problem!

Thanks!

Daniel
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Page 1 of 1

 
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

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.