Sub SaveToDocxToc(cFile, cFileTarget) Dim oPropertyValue As new com.sun.star.beans.PropertyValue cURL = convertToURL(cFile) oPropertyValue.Name = "Hidden" oPropertyValue.Value = True oDoc = StarDesktop.loadComponentFromURL(cURL, "_blank", 0, Array(oPropertyValue)) dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") dispatcher.executeDispatch(oDoc.CurrentController.Frame, ".uno:UpdateAllIndexes", "", 0, Array()) GlobalScope.BasicLibraries.LoadLibrary("Tools") cURL = ConvertToURL(cFileTarget) oPropertyValue.Name = "FilterName" oPropertyValue.Value = "MS Word 2007 XML" oDoc.storeToURL(cURL, Array(oPropertyValue)) oDoc.close(True) End Sub