Cannot assign template to existing writer odt file

I cannot assign a template to an existing writer odt file using the
menu item File->Templates->Assign template (current document).
Whenever I select a template from the list which pops up by a double
click, the following message is returned "Property or method not
found: Document Info". The document in question does have a
Properties window but it does not name the template selected, nor is
the selected template installed.

The only way I can manage to assign a template to an existing document
is to follow the procedure used to assign a template to a new file.
First open the template (.ott) file I want, then save the template as
an .odt file with a different name, and finally copy the contents from
the old .odt file to the new one.

Anybody know how to fix this problem?

By the way I am using LO 4.3.3.2 in Debian Wheezy for my desktop
computer in Thailand. I have another desktop computer in Canada where
I have Jessie and LO 5.0.2-1. I have the same problem with that compute
r.

Regards, Ken

"Property or method not
found: Document Info"

com.sun.star.document.XDocumentInfo was a deprecated interface in older
versions. For OpenOffice it is still documented here:

http://www.openoffice.org/api/docs/common/ref/com/sun/star/document/XDocumentInfoSupplier.html#getDocumentInfo

but it is gone in LibreOffice.

It looks as if the developers removed a deprecated interface in favour
of a newer, better one without considering all dependencies. This should
not happen.

Are you sure about menu:File->Templates->AssignTemplate? I can't find
the command in my LO 4.6.x

@Ken, *

Beleive the template function described came from the Template Changer
extension--
http://extensions.libreoffice.org/extension-center/template-changer --which
appears to be defunct.

Release notes clearly state is not functional with LO 4.x release and later.

The Writer 4.x guide indicates you are doing the only functional conversion
of opening a template creating a new document, and then copying in content
from the existing document. One major shortcomming there (as with the
defunct extension) is that you have to assure the Styles are named the same
between the new template and the old source document.

@Andreas, I don't agree with your assessment. The
XDocumentPropertiesSupplier is fully functional and suited to task.

XDocumentPropertiesSupplier replaced XDocumentInfo

Sub Main
  obj = ThisComponent.getDocumentInfo()
End Sub

still works with AOO and old versions of LO 3(?) but not with recent LO.
It was marked as deprecated since OpenOffice.org 2.x

Sub Main
obj = ThisComponent.getDocumentProperties()
End Sub

works with all ODF suites since OOo 2.x. The template changer extension
uses the wrong document info interface.

What version of _Template Changer_ did you install?
Or maybe, that should read, attempt to install.

At any rate, the version that works isn't on either the LibreOffice or
Apache OpenOffice Extension website.

jonathon

Same issue here - I can no longer assign a template to an existing
document. This very much impinges on the functionality of Master
Documents when working with very large [book like] documents.

Version: 5.0.4.2
Build ID: 00m0(Build:2)
Locale: en-US (en_US.UTF-8)

Has anyone figured anything else? Is the support for features like
masters documents fading out of LibreOffice?

In my Fedora 22 Version 4, there is no "File->Templates->Assign template (current document)" option.
What seems to work for me is to go to Styles and Formatting -> New Style from Selection -> Load Styles.
The "From File" option at "Load Styles" works nicely if the style isn't a template.
Does this still work in LO Writer 5?

Version: 4.4.7.2
Build ID: 4.4.7.2-4.fc22
Locale: en_US.UTF-8

Hi :slight_smile:
1a. Could someone post a "feature request" (using the bug-reporting
system) to suggest some sort of converter so that old templates can easily
converted to fit the newer system? (or have i misunderstood about newer vs
older template systems?)

1b. Even if the newer system can cope with reading the older templates it
would still be better to have the templates converted to the newer system
for the future, of course. Also it would be really great if it were
possible to automatically upgrade all existing templates at;
http://templates.libreoffice.org/template-center

2. Btw does anyone happen to know if all OpenOffice templates held on
their sites have been copied to the LibreOffice site? Would it be easy to
find out? IF it is easy then would it be reasonably easy to hunt&find
OpenOffice templates done by 3rd parties and add them to our collection
too?

3. Going off on a tangent - does anyone know if it might be possible to
convert MS Office templates so that they could be used by both us and by
OpenOffice people? If so then it might be a great opportunity for TDF to
collaborate with Apache to the benefit of both projects to remove one of
the blockers people occasionally cite as a reason they couldn't possibly
migrate away from MS.

Regards from
Tom :slight_smile:

2. Btw does anyone happen to know if all OpenOffice templates held on their sites have been copied to the LibreOffice site?

They haven't and at least some of them probably won't be, due to the
license that they are distributed under.

Does anyone know if it might be possible to convert MS Office templates so that they could be used by both us and by

OpenOffice people?

The first issue one runs into, when converting templates for MSO, is the
license that the MSO template is distributed under.

The second issue that on runs into, is a reliance upon VBA.

the blockers people occasionally cite as a reason they couldn't possibly migrate away from MS.

You'd need to probe more deeply, but my sense is that the usual reason
templates are cited as a reason to not move, is because of a major
financial investment in those templates, coupled with a lack of existing
templates that provide the same functionality for LibO, AOO, etc.

By major financial investment, I'm referring to templates that
individually have an MSRP of US$100, or more.

jonathon

Yes, just tried it - Load Styles still works. So at least I get styles
of the same name - so if the file is included in a master document I
should get consistency.

According to this:
https://bugs.documentfoundation.org/show_bug.cgi?id=60592&redirected_from=fdo#c11

... you need to use this link for a working Template Changer:
http://bugs.documentfoundation.org/attachment.cgi?id=103039

It creates the missing, not working, menu entries.

Works on 5.0.5.2 (Xubuntu 15.10), indeed a valuable tool when editing master and slave documents, but also for applying multiple corporate templates.