Bug 63298 - : Windows WSH Automation error with method .getDocumentInfo()
Summary: : Windows WSH Automation error with method .getDocumentInfo()
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected) release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
Whiteboard: BSA
Keywords: regression
Depends on:
Reported: 2013-04-09 07:51 UTC by fremdling
Modified: 2013-04-09 09:30 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description fremdling 2013-04-09 07:51:32 UTC
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:
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")
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")

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: release
Last worked in: release
Comment 1 GerardF 2013-04-09 09:30:36 UTC
There is change in the API. XDocumentInfo is removed.
Look at releases notes for 4.0 :