nobbe Posted July 3, 2008 Share Posted July 3, 2008 (edited) Sample code showing how to open files with openoffice Writer and Calc / read text / save as HTML or PDF - added gettext - added a batch converter for RTF->PDFopenoffice_test.au3 Edited July 4, 2008 by nobbe robertocm 1 Link to comment Share on other sites More sharing options...
nobbe Posted July 4, 2008 Author Share Posted July 4, 2008 this is how to insert a picture (but i cant get more than one picture to work..?) CODE; ; insert a Picture at end of file ; Func _OO_INSERT_PIC($file) $file = _Convert2URL($file); $objText = $OO_Doc.getText(); $objCursor = $objText.createTextCursor() $graficobject = $OO_Doc.createInstance("com.sun.star.text.TextGraphicObject"); $graficobject.GraphicURL = $file ; insert picture in file $objText.insertTextContent($objCursor, $graficobject, False); EndFunc ;==>_OO_INSERT_PIC Link to comment Share on other sites More sharing options...
Angel Posted December 2, 2008 Share Posted December 2, 2008 Hi nobbe, I have just tried your example and it does not seem to work with OpenOffice 3.0. I get the following error: file:///test.doc C:\openoffice_test.au3 (160) : ==> The requested action with this object has failed.: $OO_Doc = $OO_Desktop.loadComponentFromURL($infile, "_blank", 0, $inputargs) $OO_Doc = $OO_Desktop.loadComponentFromURL($infile, "_blank", 0, $inputargs)^ ERROR Do you have any idea why this may be failing, other than the fact that I am using OpenOffice 3.0? Cheers, Angel Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now