Creating a document

From OpenOffice.org Wiki

Jump to: navigation, search

The following function creates a new document of the specified type in a new window.

function fnNewDoc(sDocType as string)
fnNewDoc = StarDesktop.loadComponentFromURL("private:factory/" & sDocType , "_blank", 0, Array())
end function

Examples of calling this function:

oDoc = fnNewDoc("swriter")
oDoc = fnNewDoc("scalc")
oDoc = fnNewDoc("simpress")
oDoc = fnNewDoc("sdraw")
oDoc = fnNewDoc("smath")
Personal tools
Create a book