Problem with Writing to TextFrame in OpenOffice Text Documnet


I placed a TextFrame control on newly created .odt text document..
I'm able to accessing the TextFrame(control what I placed in .odt document) but not succeeding in writing to it from my code.

Here is my code snippet:

Dim objDocument As XComponent
objDocument = objDesktop.loadComponentFromURL(PathConverter(FileNameSource), "_blank", 0, New PropertyValue(-1) {})

Dim xNamedFrames As XNameAccess = DirectCast(objDocument, XTextFramesSupplier).getTextFrames
Dim textFrames As String() = xNamedFrames.getElementNames()

Dim FrameName As Object = xNamedFrames.getByName("txtFrameEmpID")

I strucked from here in writing /inserting Some Database value into this Frame.

Could anyone help to resolve this?


  • seancampbellseancampbell Pennsylvania, USA
    Have you tried parsing the TextFrames() array to see if txtFrameEmpID is in there?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion