' Credit goes to Cuzuco's post: ' http://www.oooforum.org/forum/viewtopic.phtml?t=31818 Sub SaveAsHTML( cFile ) cURL = ConvertToURL( cFile ) ' Open the document. Just blindly assume that the document ' is of a type that OOo will correctly recognize and open ' without specifying an import filter. oDoc = StarDesktop.loadComponentFromURL( cURL, "_blank", 0, _ Array(MakePropertyValue( "Hidden", True ),)) Select Case LCase(Right(cFile,3)) Case "pdf" ' PowerPoint file. LeFilter = " writer_web_pdf_Export" Case "ppt" ' PowerPoint file. LeFilter = "impress_html_Export" Case "pps" ' PowerPoint file. LeFilter = "impress_html_Export" Case "doc" ' Word file. LeFilter = "HTML (StarWriter)" Case "xls" ' Excel file. LeFilter = "HTML (StarCalc)" Case Else LeFilter = "xxx" End Select cFile = Left( cFile, Len( cFile ) - 4 ) + ".html" cURL = ConvertToURL( cFile ) ' Save the document using a filter. oDoc.storeToURL( cURL, Array(_ MakePropertyValue( "FilterName", LeFilter ),) oDoc.close( True ) End Sub