How to run OpenOffice and pass a document to it?

I want to open xyz.txt file in Open Office Writer from Windows command line. The manual show only the command for opening the file in read only mode. But I want to open it in Edit mode.

c:\Program Files (x86)\OpenOffice 4\program\swriter.exe -view "xyz.txt"
asked Nov 4, 2016 at 12:36 2,121 7 7 gold badges 35 35 silver badges 49 49 bronze badges

Solved: the command is -o. I was mislead by the way they explained that parameter in the manual. However, there is a problem. Instead of simply opening the document, OpenOffice shows firstly the 'ASCII filter option' dialog, and then the actual document.

Commented Nov 4, 2016 at 12:38

In fact you don't need any options at all: "c:\Program Files (x86)\OpenOffice 4\program\swriter.exe" "xyz.txt" will open the document, and it will be in view mode only if it's read-only.