Problem description: We use WSH scripts for automation. Before LO update prior 4.0 from 3.6 everything was fine. But now it is not. Error occurs when method getDocumentInfo() is called. Simplified Script: <pre> set fso=CreateObject("Scripting.FileSystemObject") Set objServiceManager = CreateObject("com.sun.star.ServiceManager") Set Stardesktop = objServiceManager.createInstance("com.sun.star.frame.Desktop") Set dispatcher = objServiceManager.createInstance("com.sun.star.frame.DispatchHelper") Set V = objServiceManager.Bridge_GetStruct("com.sun.star.beans.PropertyValue") path=fso.GetFolder(".\templates\").Path&"\" Set doc = Stardesktop.loadComponentFromURL("file:///"&path&"RightWay.dot", "_blank", 0, Array(V)) Set oText = doc.getText() Set DocI=doc.getDocumentInfo() call doc.LockControllers call DocI.setPropertyValue("f2ADRU","test") doc.getTextFields.refresh() </pre> Script receives error: Windows Script host Unsupported method or property 'getDocumentInfo' Error: 800A01B6 So, some how LO 4 cannot call: Set DocI=doc.getDocumentInfo() Current behavior: Error occurs. Expected behavior: Everything must be smooth, like in LO 3.6 :) Operating System: Windows XP Version: 4.0.2.2 release Last worked in: 3.6.2.2 release
There is change in the API. XDocumentInfo is removed. Look at releases notes for 4.0 : https://wiki.documentfoundation.org/ReleaseNotes/4.0#API_Changes