Difference between revisions of "Creating a document"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 18: Line 18:
  
 
[[Category:Basic:Tutorials]]
 
[[Category:Basic:Tutorials]]
[[Category:Tutorials]]
 

Revision as of 17:51, 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")

Personal tools