Default to Web View

Discuss the word processor
Post Reply
Bloosky
Posts: 4
Joined: Thu Jun 22, 2017 7:02 pm

Default to Web View

Post by Bloosky »

I have looked at people with the same problems in years past but I tried all the solutions I saw and none worked. If I have an .odt or .rtf file I would like to have the default view come up as 'Web View'. I change it and save the file but it always comes up as Print View next time I open it.
Open Office 4.1.3
Windows 10
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Default to Web View

Post by acknak »

Greetings and welcome to the community forum!

The document view is not saved when you save a document as rtf; in fact, rtf is rather poorly supported by OO in general. The safest and most robust course is to always save in OOo's native ODF format (.odt for text). You can always export a copy to another format as necessary and be sure your work is still safe in the ODF copy.

Note that there is a big difference between a document displayed in "web layout" view and an "html document".

If you want the web layout view to be the default for new OO Writer documents, just save a document (in web view) as a template and set that template as the default. New Writer documents will use the default template, include the view setting.
AOO4/LO5 • Linux • Fedora 23
Bloosky
Posts: 4
Joined: Thu Jun 22, 2017 7:02 pm

Re: Default to Web View

Post by Bloosky »

Thanks for the reply. I suspect using a template is on the right track. However, as far as doing any configuring on OpenOffice I am still a bit of a noob. I found a .pdf tutorial on how to use Templates, but it was written in 2004, so I don't know if it is still valid. I thought I followed all the instructions and assigned a template that was a web view to my .odt file but it still opens up in Print view. Can you give me detailed instructions on how to set up a template, or point me to an up to date reference/tutorial on it. Thx.
Open Office 4.1.3
Windows 10
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Default to Web View

Post by acknak »

Templates in OO are so simple they're a little confusing. A template is just a regular document that's marked as a template. It has no special powers or features. When you start a new document from a template (File > New > Templates & Documents ...), OO opens the template document, loads all its settings and content, then configures the resulting open document as a new, unsaved document. So the template can provide settings and content *when you start a new document* but only at that point. Once you've added content or formatting to the new document, the template is completely out of the picture.

That means there's no way to "assign a template that was a web view to my .odt file" because the .odt file is already a working document.

If you have a working document and you want it to open in web layout, just switch to web layout and save the document. (You may have to edit it or use File > Save As to save it; I don't know if changing the view is enough to set the "document changed" status.)

If you often create Writer documents in web layout, make a template: start a new document (File > New > Text Document ...) switch to web layout, and save that as a template (File > Templates > Save ...). If you want *every* Writer document to start out in web layout, then set the template as the default template and Writer will use it by default.

For details, see viewtopic.php?f=71&t=1161
AOO4/LO5 • Linux • Fedora 23
Bloosky
Posts: 4
Joined: Thu Jun 22, 2017 7:02 pm

Re: Default to Web View

Post by Bloosky »

Well, I played around with it some more, and I can see how now I can start OpenOffice and then select Text Document and it will use my template, then I can save the file as whatever name I want. I guess I was also hoping for:

1) Make existing odt files default to opening in web view
2) Use the Windows context menu and 'New' to create an OO file that defaults to web view

Neither of last two methods work still.
Open Office 4.1.3
Windows 10
User avatar
Zizi64
Volunteer
Posts: 11363
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Default to Web View

Post by Zizi64 »

If I have an .odt or .rtf file I would like to have the default view come up as 'Web View'. I change it and save the file but it always comes up as Print View next time I open it.
You can write a macro and embed it into the .odt document to change the View property of the Writer application. (Or you can embed the macro into a .ott template, but you can not to do it with the foreign formats .rtf and other filetypes, because the foreign fileformats can not store the AOO/LO macros in a workable format).

You need assign the macro to the appeare event of the document: it will be launched when the document/template appearing on the screen after opening, and the macro will set the View property of the Writer application.

Available events for this task:
'Document created'
'Document loading finished'
'View created'

See it in the Tools - Customize - Events tab of the menu.
And you must set the macro security to 'Medium' for enable launching a macro embedded in a document/template file.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Default to Web View

Post by acknak »

Bloosky wrote:...
1) Make existing odt files default to opening in web view
2) Use the Windows context menu and 'New' to create an OO file that defaults to web view
1) Not possible, short of using some macro programming to change the view, or opening each document, changing the view, and saving the document.

2) There is a mismatch between the way Windows starts a new document and the way OO needs to do it that leads to OO using a different template when you start from the desktop. There is a solution/workaround but I don't remember what it is, exactly. Try a forum searcj, or maybe someone else can provide the steps.
AOO4/LO5 • Linux • Fedora 23
Bloosky
Posts: 4
Joined: Thu Jun 22, 2017 7:02 pm

Re: Default to Web View

Post by Bloosky »

Yeah, on #2, I followed 2 different tutorials on how to change the registry for 'New" and neither seemed to work for .odt documents. On #1, the existing documents, it would probably be just as easy to use the method of opening OO, create a new document, and then just copy and paste the old document into it.
Open Office 4.1.3
Windows 10
Post Reply