Hi Peter,

> but the document is frozen (no cursor, no scrolling, etc.)
> Working with oo is possible with other documents furthermore.

this sounds pretty much like my problem we were talking about some weeks ago:
i print a document with my custom print dialog. after that a second document is
opened, parts of the first documents are copied and then printed too.
after closing this document the first document is frozen sometimes ...

till now i have no solution for this problem, but i can recover the frozen 
using the macro below.

can you recover your the frozen document too ?



Sub DocRescue()

        Dim oDoc as Object
        Dim oServiceManager as Object
        Dim oDesktop as Object
        Dim oComponents as Object
        Dim oComponent as Object
        Dim oFrame as Object
        Dim sTitle as String
        Dim mFileProps(0) as New com.sun.star.beans.PropertyValue
        Dim oNull as Object

        oDoc = ThisComponent
        oServiceManager = GetProcessServiceManager()
        oDesktop = oServiceManager.createInstance("com.sun.star.frame.Desktop") 
        oComponents = oDesktop.Components.CreateEnumeration

        While oComponents.HasMoreElements()
                oComponent = oComponents.NextElement
                If Not EqualUnoObjects(oDoc, oComponent) Then
                        sTitle = oComponent.Title

                        If MsgBox("Dokument: """ & sTitle & """ retten?", 32+4, 
"Dokument retten...") = 6 Then

                                oFrame = 
                                oFrame.Title = "wird geschlossen..."

                                mFileProps(0).Name = "Model"
                                mFileProps(0).Value = oComponent
"_blank", 0, mFileProps())


                                oComponent = oNull
                                oFrame = oNull
                                Exit Sub
End Sub


GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to