Apache OpenOffice (AOO) Bugzilla – Issue 23479
RTF Conversion with macro fails for certain documents
Last modified: 2013-08-07 14:38:26 UTC
RTF conversion by a macro fails (reproducable) for long documents while it works with shorter documents. This is the macro code: Sub Main (FileName as string) On Error Goto ErrorHandler Dim Doc as Object Dim document as Object Dim Url as String Dim Dummy() Dim oCursor As Object 'Save as HTML HTMLFileName = ReplaceFileAppendix(FileName, "html") Dim args1(1) as new com.sun.star.beans.PropertyValue args1(0).Name = "Overwrite" args1(0).Value = True args1(1).Name = "FilterName" args1(1).Value = "HTML (StarWriter)" Doc.storeAsURL("file://" + HTMLFileName, args1()) 'Save As RTF RTFFileName = ReplaceFileAppendix(FileName, "rtf") args1(1).Value = "Rich Text Format" Doc.storeAsURL("file://" + RTFFileName, args1()) 'Save As PDF PDFFileName = ReplaceFileAppendix(FileName, "pdf") Dim PDFargs1(1) as new com.sun.star.beans.PropertyValue PDFargs1(0).Name = "FilterName" PDFargs1(0).Value = "writer_pdf_Export" PDFargs1(1).Name = "CompressMode" PDFargs1(1).Value = 0 Doc.storeToURL("file://" + PDFFileName, PDFargs1()) Doc.dispose() Exit Sub ErrorHandler: Doc.dispose() End Sub
set target to OOo later
HI->JSK: Please take a look.
Hi burgi, can you determine at which instruction the conversion fails? Additionally, the code is incomplete, it would make things easier for me if you could include the function ReplaceFileAppendix( ... ).
Reset assignee on issues not touched by assignee in more than 2000 days.