Click here to Skip to main content
15,899,314 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

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 Vb.net code.

Here is my code snippet:

VB
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?

[Modified: fixed pre tags...you don't place them around the entire text of your post. also, why did you assign the language as C++ when it's not?]
Posted
Updated 31-Mar-10 9:30am
v2

1 solution

Hi
This may help you

VB
Document
-SheetCollection = Document.getSheets()
--Sheet = SheetCollection.getByName( sheetName)
---Cell = Sheet.getCellByPosition( i,j)
----TextCursor = Cell.createTextCursor()
----Cell.insertString(TextCursor)


This is the hierarchy of objects in Open Office for writing a data to cell, please refer Open Office API, http://es.openoffice.org/files/documents/73/1562/OOoBasicTutorial.pdf[^]

Thanks & regards
Radhakrishnan G.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900