[Solved-Workaround] Macro to insert date/time as plain text

Discuss the word processor
Post Reply
Olmy
Posts: 9
Joined: Tue Jul 28, 2009 4:59 pm

[Solved-Workaround] Macro to insert date/time as plain text

Post by Olmy »

Not really sure if this should be in this forum or the macros one, but...

I want some very, very simple macros to insert the date and time (in particular formats), as plain text, into Writer docs.

I recorded a macro inserting the fields in the formats I wanted, cutting them and pasting them back as 'unformatted text', then saved them in a module. This worked fine until I exited Writer and re-started it.

Now, when I run the macros, I get decimal numbers inserted....?

Help much appreciated...

Title Edited. A descriptive title for posts helps others who are searching for solutions and increases the chances of a reply (Hagar, Moderator).
Last edited by Olmy on Sat Aug 01, 2009 2:31 pm, edited 1 time in total.
User avatar
probe1
Volunteer
Posts: 277
Joined: Mon Oct 08, 2007 1:34 am
Location: Chonburi Thailand

Re: Simple Macro??

Post by probe1 »

This question could have been avoided (here or in the BASIC sub forum) by using the search function...


http://extensions.services.openoffice.o ... /DateTime2
Cheers
Winfried

DateTime2 extension: insert date, time or timestamp, formatted to your needs
Olmy
Posts: 9
Joined: Tue Jul 28, 2009 4:59 pm

Re: Simple Macro??

Post by Olmy »

Thanks but I did actually find the downloadable module, but...

1/ It's not exactly user-friendly and I've tried to modify what looked like the formats to what I want, without success.

2/ I'd prefer to understand the simple macro procedure for future reference.
Olmy
Posts: 9
Joined: Tue Jul 28, 2009 4:59 pm

Re: Macro to insert date/time as plain text

Post by Olmy »

Found this..
http://www.oooforum.org/forum/viewtopic.phtml?t=40039

If I record an insert->fields->date and then delete it before inserting what I actually want, it works!

Seems odd though.....
Post Reply