Hi,

just noticed, that instantiating the service 
"com.sun.star.document.XStandaloneDocumentInfo" via OO basic
causes a crash :-(
SO 8.0 PU 3 is also affected ...

reading the info was at least possible with OO 2.0.1

please have a look at issue 
http://www.openoffice.org/issues/show_bug.cgi?id=60116

Oliver


--
REM  *****  BASIC  *****
Option Explicit

Sub Main

        On Local Error Goto ErrorHandler

        Dim oSM, oDesk, oInfo As Object
        Dim sFile as String
        Dim sTitle as String

        sFile = "E:\test.sdw"
'       sFile = "E:\test.sxw"
'       sFile = "E:\test.odt"

        oSM = CreateObject("com.sun.star.ServiceManager")
        oInfo = 
oSM.createInstance("com.sun.star.document.StandaloneDocumentInfo")

        oInfo.loadFromURL(ConvertToUrl(sFile))
        sTitle = oInfo.getPropertyValue("Title")
        msgBox sTitle

        oInfo.setPropertyValue("Title", "Hello World")
        oInfo.storeIntoURL(ConvertToUrl(sFile))

        Exit Sub
ErrorHandler:
        MsgBox Error() & Chr(13) & Erl() & Chr(13) & Err()
End Sub
-- 


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]

Reply via email to