Jump to content

Using Openoffice as PDF & HTML Converter


nobbe
 Share

Recommended Posts

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

  • 4 months later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...