Dear Sirs!
I know that I don't send this email to the people who can help me, but I didn't
found another.
It would be nice if you could help me!
What I would like to do with OpenOffice:
I would like to generate a library for the macros in Calc, and after that I
would like to create a basic-module. I found some documentations, but the most
are deprecated. But even the methods and functions wich are not deprecated
don't work! To explain what I mean I send you a part of my source-code:
###############################################
Private Sub AddModule
Dim Document As Object
Dim Container As Object
Dim strPath As String
Dim Args()
' Give path and open document
strPath = "file:///C:/test/AddToMe.ods"
Document = StarDesktop.loadComponentFromURL(strPath, "_blank", 0,
Args())
'Document.createLibrary("MyNewLib", "", "", strPath)
'Document.addModule("Standard", "MyNewModule", "", "Sub Main End Sub")
' Save changes
Document.storeAsURL(strPath, Args())
' Close document
Document.Close(true)
End Sub ' AddModule()
###############################################
This is one of two ways I have tried creating a module!
The second way don't works too:
###############################################
' Give path and open document
strPath = "file:///C:/test/AddToMe.ods"
Document = StarDesktop.loadComponentFromURL(strPath, "_blank", 0,
Args())
Container = Document.getLibraryContainer()
Container.createLibrary("MyNewLib")
###############################################
For an easier understanding here are the links with the documentations:
http://api.openoffice.org/docs/common/ref/com/sun/star/script/XLibraryContainer.html#createLibrary
http://api.openoffice.org/docs/common/ref/com/sun/star/script/XStarBasicAccess.html#createLibrary
I shall be pleased if you could help me! If not, it would be nice if you would
give me an email adress from someone who could help me!
Thank you for all!
Yours sincerely
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]