OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

nofirststartwizard

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
holtzy2
General User
General User


Joined: 22 Jan 2007
Posts: 7

PostPosted: Mon Mar 05, 2007 10:40 am    Post subject: nofirststartwizard Reply with quote

I'm opening OpenOffice via:
Code:
Dim objDummy As Object = New Object   'used only to get a type
        Dim objSM As Object = CreateObject("com.sun.star.ServiceManager")
        Dim objCR As Object = objSM.CreateInstance("com.sun.star.reflection.CoreReflection")
        Dim objDesktop As Object = objSM.CreateInstance("com.sun.star.frame.Desktop")

        'Make sure you dim args as System.Array & initialise the array with the type Object so that it is marshaled as a safearray
        Dim myArgs As System.Array
        myArgs = System.Array.CreateInstance(objDummy.GetType, 1)
        Dim openCalcArgs As System.Array
        openCalcArgs = System.Array.CreateInstance(objDummy.GetType, 1)

        'Clean up
        objDummy = Nothing

        'Open blank calc spreadsheet, hidden
        openCalcArgs(0) = MakePropertyValue("Hidden", True)

        Dim objDocument As Object = objDesktop.LoadComponentFromURL("private:factory/scalc", "_blank", 0, openCalcArgs)
Is there a property value I can pass along with Hidden so that the wizard won't appear on first use of OpenOffice? Something like nofirststartwizard maybe?
Back to top
View user's profile Send private message
Mark B
Super User
Super User


Joined: 16 Feb 2007
Posts: 852
Location: Lincolnshire, UK

PostPosted: Tue Mar 06, 2007 3:51 am    Post subject: Reply with quote

Hi

Do you mean that you want to run the macro completely in the background? On Linux you can use:
Code:

oocalc -headless -display :0 <library>.<module><macro>

On Windows use scalc instead of oocalc.

Mark
_________________
Mark B's Articles
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group