Peter Eberlein wrote:
> Hi Matthias,
> 
> Matthias Benkmann schrieb:
>> Is there a way to determine the URL of the template that was used to
>> create a new document in the OnLoad event handler?
>> 
> oDoc.DocumentInfo.Template should do that, but I assume, there is a bug, 
> I get a null-string.

This is not a bug, it is done by intent. The "Template" property is not
a URL, it contains the logical name of the template a document is based
on, so this string is only set if you create a document from the "New
from template" dialog. The property is used to allow for updating the
styles of the document if you change the template later.

If you use the API (or the desktop "As Template" function) to create a
document from a template no connection to this template is kept in the
document metadata. The documents forgets about the template immediately
after creation.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to