Difference between revisions of "Creating a document"
From Apache OpenOffice Wiki
Line 16: | Line 16: | ||
oDoc = fnNewDoc("smath") | oDoc = fnNewDoc("smath") | ||
</code> | </code> | ||
+ | |||
+ | [[Category:Basic:Tutorials]] | ||
+ | [[Category:Tutorials]] |
Revision as of 17:43, 16 May 2006
The following function creates a new document of the specified type in a new window.
[oobas]
function fnNewDoc(sDocType as string)
fnNewDoc = StarDesktop.loadComponentFromURL("private:factory/" & sDocType , "_blank", 0, Array())
end function
Examples of calling this function:
[oobas]
oDoc = fnNewDoc("swriter")
oDoc = fnNewDoc("scalc")
oDoc = fnNewDoc("simpress")
oDoc = fnNewDoc("sdraw")
oDoc = fnNewDoc("smath")