[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openoffice-discuss
Subject:    Re: [discuss] User-defined fields in templates
From:       Daniel Vogelheim <Daniel.Vogelheim () sun ! com>
Date:       2002-02-28 18:15:38
Message-ID: 3C7E73CA.604 () sun ! com
[Download RAW message or body]

Hello,

kjames22@csc.com wrote:

> I'm trying to set up word processor templates (641C) for a group of 
> developers.  In Word, I can define fields in the template, and when a 
> user opens the template, those values are displayed in the document.
> 
> For example:  
> 
> For the built-in TITLE field, which has a 1 to 1 correspondence in OOo, 
> in the Word template I set the value to "Change title using File > 
> Properties"
> This helps to "self-document" the template.  There are also user-defined 
> fields that I use, e.g., in Word: {DocProperty "Release"}, value= 
> "Release 4.4", {DocProperty "Confidential"}, value = "Commercial in 
> Confidence".  
> 
> In OOo,  I can set up user-defined fields that work perfectly BUT ONLY 
> in the current document. If I save the file as a template, and create a 
> new document based on the template, the fields all disappear.  Or 
> rather, the TITLE field remains but it has no value.  The user-defined 
> fields vanish altogether.

sorry for the late answer. I think, this is actually a feature we 
explicitly built in. When loading a template an update is forced on 
certain fields, unlike the bahviour in the regular documents. This was 
IIRC due to user suggestions. A (fixed) author field in a template 
should be updated when the template is instantiated, as in general you 
don't want to see the template's author, but rather the document author 
(i.e., the one who instantiates the template).

I think this is why your use of the title field doesn't work the way you 
intend: You put in a certain value, and when the template is 
instantiated, we force the title field to update. This causes it to be 
empty, since the title has no yet been set.



Sincerely,
Daniel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic