[Solved] Set Variable/Show Variable

Using them, Making them , Finding them

[Solved] Set Variable/Show Variable

Postby bmauger » Wed Mar 07, 2012 1:48 am

Maybe there's an easy way to do this, but it's not apparent from the two hours I've spent trying to figure this out. Let's say I have a simple letter that I want to write like this:

Dear Brian,

Re: Your Document EasyTemplate.ott

Hey Brian, thanks for your work. As you had requested, I've attached a copy of your document as EasyTemplate.ott. If you have any questions, let me know.

Thanks again Brian,


And I want to send the letter pretty frequently, but the client name ("Brian") and the file name ("EasyTemplate.ott") are going to change each time.

I can kind of do this by using CTRL-F2; Variable; Set Variable, Name: "ClientName" Text: "Brian" and then use Variable; Show Variable to put Brian's name in elsewhere. If I then save it as a template, I can double click on the spots where the variable is first set and change the Text: to "Dave" and it will automatically update in the other locations.

This is close to what I need, but I'm wondering... Is there a way to create a template so that when I open it, it will prompt me for the variables I need to set (like a popup)? Or can I have a list of variables at the top of the page that need set, but not have them show up in the final version? Or other (preferably simple) workarounds that will let me fill in the parts of a form that need changed and autoupdate it elsewhere throughout the document?

Thanks,
Last edited by Hagar Delest on Thu Mar 08, 2012 10:21 am, edited 1 time in total.
Reason: tagged [Solved].
-Bobby
OOo 3.3.0 on Win 7
bmauger
 
Posts: 3
Joined: Wed Mar 07, 2012 1:12 am

Re: Set Variable/Show Variable

Postby JohnV » Wed Mar 07, 2012 6:09 am

Is there a way to create a template so that when I open it, it will prompt me for the variables I need to set (like a popup)?
Yes. At Ctrl+F2 > Variables tab, select User Field, name it and click the green check mark but not not click Insert. Move up in the Type box to Input Field and fill the Reference box with a prompt like "Enter client's name." Then click Insert, tap the space bar a few times and click OK. Move back to User Field and Insert any other occurrences of this variable (you only want one Input Field per variable or you will will be prompted for it content more that once).

Save the document as a template.
JohnV
Volunteer
 
Posts: 1585
Joined: Mon Oct 08, 2007 1:32 am
Location: Kentucky, USA

Re: Set Variable/Show Variable

Postby bmauger » Wed Mar 07, 2012 11:44 pm

Perfect. Sorta had figured it out, but still hadn't realized that I could set a varible without inserting it by using the checkmark. So much easier now. Just wish it would default to variables being text instead of generic numbers. Thanks.
-Bobby
OOo 3.3.0 on Win 7
bmauger
 
Posts: 3
Joined: Wed Mar 07, 2012 1:12 am


Return to Templates

Who is online

Users browsing this forum: No registered users and 1 guest