Sub ManipulateHiddenDoc Dim oDoc Dim oVal(1) As New com.sun.star.beans.PropertyValue Dim oscriptProvider Dim oScript oVal(0).Name = "Hidden" oVal(0).Value = True oVal(1).Name = "MacroExecutionMode" oVal(1).Value = com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN oDoc = StarDesktop.loadComponentFromURL("file:///c:/tmp/a.odt", " blank", 0, oVal()) oscriptProvider = oDoc.getScriptProvider() oScript = oscriptProvider.getScript("vnd.sun.star.script:Standard.Module1.MyMacro?language=Basic&location=document") oScript.invoke(array(), array(), array()) Wait 5000 oDoc.CurrentController.Frame.ContainerWindow.Visible = True oDoc.CurrentController.Frame.ContainerWindow.toFront() End Sub