Windows bug? Opening OTT does not create new document.

No idea whether this is the right place to report this, but I have had a
search to see if this bug has previously been reported and not found
anything.

Double-clicking on a OpenDocument Text Template (OTT) in windows opens the
template file rather than creating a new document based on the template.
I am running LibreOffice 3.3.0 OOO330m19 (Build:6) on Windows 7. The
template in question is one I created and is nothing fancy, just has some
sub-headings in it.

I dual-boot with Ubuntu 10.04. If I double-click on the same file under
Ubuntu, LO creates a new document based on the template as expected.

Neil

What does happen on your computer when you do this?:

C:\>assoc .ott
.ott=opendocument.WriterTemplate.1

C:\>ftype opendocument.WriterTemplate.1
opendocument.WriterTemplate.1="C:\Program Files (x86)\LibreOffice
3\program\swriter.exe" -o "%1"

C:\>

Well, unfortunatly my windows install is old (build:3), but at this point,
it did create a new document based on the template when you double-click an
OTT file.
Maybe at some point file associations were modified in your windows install
? Try right-clicking on the OTT file to see if there is a "New" option, or
only an "Open" option. On my system I have both, and "New" is the default.

@Luuk

I get exactly the same output as you suggest:

*C:\>assoc .ott*
*.ott=opendocument.WriterTemplate.1*

You can change file associations using the windows control pannel. However,
this part got really dumbed down in windows vista/seven. On this page is the
procedure to follow, as well as another little program that seem closer to
what we had in XP, letting you choose easily the default action:
http://www.winvistaclub.com/t19.html

In stead of installing this extra software, i DO want this in standard
Windows.
I'll post a squestion on a microsoft-forum...

Well, if you find out how to get the old dialog (from XP) back in Seven,
please tell back. It worked well and was easy to use; maybe it was too much
for windows :frowning:

Because after looking into this problem, i had the same problem on my
Windows7 computer, thought well it should be easy to solve by
uninstalling/installing LO.... But that did not work

So i dived into REGEDIT ..... (of course obeying the rules Microsoft has
for this)

After a lot of .....time i did find a key which is the cause of this
problem.

It can be show on the commandline when doing:
REG EXPORT
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ott\UserChoice
ott.reg

When you get an error like this:
"ERROR: The system was unable to find the specified registry key or value."
you should not have this problem

The file "ott.reg" is a backup of the piece we are going to delete:

Easiest way to delete this key was via REGEDIT
(other option gave "ERROR: Error accessing the registry."

Start REGEDIT
Find the key where HKCU is HKEY_CURRENT_USER
Whith "UserChoice" selected, press the Delete button, and confirm deletion.
Close REGEDIT

double-clicking on an .ott-file should now open a new document based on that
template.

It's never a good idea diving through the registry when there is a frontend
for it, even if it's badly done. The link I gave you to alter the default
choice with windows control panel is not optimal, but I think less
hazardous.

maybe i would have looked at it if you posted this link:
http://types.sourceforge.net/

and not:
http://www.winvistaclub.com/t19.html

But i hate it to install another tool for something which i use rarely, that should be possible with standard tools in Windows.
and, of course that might not be the easiest way :wink:

The third-party tool is only the second option on the link I gave you (which
I shamelessly stole from google search :D). The very same page describe how
to do it with only the windows control panel, although it's quite harder to
do than in XP, it's still possible. That was the point of my last message.

Hi :slight_smile:

Surely this can be done from the right-click menu? When you right-click on the
document go down to "Open with ..." (NOT "Open"), it might be inside
"Properties". Then just select the appropriate application/package/program from
the list.

Regards from
Tom )

no, this will only change the default action 'open' for that extension,
not the action 'new' that is attached to this extension.

Why don't you use the ASSOC and FTYPE pair instead?

For more details, have a look at my msg timestamp 2011/01/31 10:12
in the "Set libreoffice file associations" thread. BTW, you answered that msg :wink:

HTH,

ASSOC and FTYPE only handle the 'open' action.
not the 'new' action which is default on the ott-extension.

Luuk

ooops! sorry, didn't remember that :frowning:

I got it sorted without installing extra software. *.ott files were
associated with LibreOffice Writer whereas the other templates
(presentation, etc.) were associated with LibreOffice (soffice.exe).

Change the association in Control Panel > Default Programs > Associate a
file type or protocol with a program.

That sorted it, but it removes the 'New' option from the right-click menu.
Opening the file through soffice.exe rather than swriter.exe creates a new
document based on the template though.

Hi :slight_smile:

In theory the "New" option should now be at the top of the right-click menu,
separated slightly from the rest of the options there. However, theory and
things that 'should be' are often quite different from reality. The important
thing is that a double-click opens a new document.

Regards from
Tom :slight_smile: