rossati Posted July 30, 2016 Share Posted July 30, 2016 Hello I would pass an array of object to OpenOffice API, but this fails, I think for incompatibility of array declaration. This is a ooBasic fragment that I would "convert" in AutoIt: ... Dim aProps(0) As New com.sun.star.beans.PropertyValue ' get configuration of the file history oCP = GetProcessServiceManager().createInstanceWithContext( _ "com.sun.star.configuration.ConfigurationProvider", GetDefaultContext() ) aProps(0).Name = "nodepath" aProps(0).Value = "/org.openoffice.Office.Common/History" oCUA = oCP.createInstanceWithArguments( _ "com.sun.star.configuration.ConfigurationUpdateAccess", aProps ) ... This Autoit fragment fails: Global $ooF = ObjCreate("com.sun.star.ServiceManager") $oCP = $ooF.createInstance("com.sun.star.configuration.ConfigurationProvider") Global $ooBeans[1] $ooBeans[0] = $ooF.createInstance("com.sun.star.beans.PropertyValue") $ooBeans[0].Name = "nodepath" $ooBeans[0].Value = "/org.openoffice.Office.Common/History" ; the underlying statement generates an error: (0x80020005) Type mismatch $oCUA =$oCP.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", $ooBeans[0]) ; the underlying statement generates a syntax error: The requested action with this object has failed. msgbox(0,"",$ooBeans[0].Value) It is possible work around? Thanks John Rossati Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now