OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Auto-replace / Variables - is this possible?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
JaoUSA
Newbie
Newbie


Joined: 18 Jan 2007
Posts: 1

PostPosted: Thu Jan 18, 2007 11:15 am    Post subject: Auto-replace / Variables - is this possible? Reply with quote

Hi all, I'm very new to OO, and have a (hopefully) easy question:

What I want to do is make a custom vairable... such as %t%, and have it auto-replaced (or replaced upon F9)...with the predefined function YYYY-MM-DD HH:MM:SS, but I have no idea how / if it's possible....

The "Fields" looks like it can do the trick, but after toying with it for two hours now and having no luck... The most I've come up with is Insert -> Fields -> Date/Time, which isn't customized and requires using the dropdown to use (vs %var%/F9)...

If you have any ideas/suggestions I'd be grateful!

Thanks!
Back to top
View user's profile Send private message
acknak
Moderator
Moderator


Joined: 13 Aug 2004
Posts: 4295
Location: ~ 40°N,75°W

PostPosted: Thu Jan 18, 2007 1:02 pm    Post subject: Reply with quote

Can you tell us exactly what you want to accomplish?

You can define a variable field, which can hold any number or text you like. You can place one instance setting the variable at the beginning of the document, followed by instances of a field showing the variable, with a specific format if you like. If you edit the first "set variable" field to change the value, all the others will show the new value.

Variables can hold only plain text or numbers, but the field instance can be formatted as needed; the displayed value will receive the formatting.

Alternatively, you can define "Autotext"s or Autocorrect replacements, where one string is replaced by another, either manually (Autotext; F3) or automatically as you type (Autocorrect).

I don't think there is any way to write something like "%var%" and then hit one button which causes all ocurrences to be replaced with something else. A macro to do that, I'm sure.
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Thu Jan 18, 2007 5:29 pm    Post subject: Reply with quote

I think of the methods suggested you want to use AutoText.

First go to Insert > Fields > Other (of Ctrl+F2) > Document tab > Time / Time (fixed) / Some Format. If you don't like the default format go to Additional Formats and define your own. Insert the field then select it and do Ctrl+F3 to get to AutoText to further set it up.

Never used AutoText type dt followed immediately by F3 to insert some dummy text.

Fields don't seem to work correctly for me in AutoCorrect.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group