I agree that recording seems to record only selected things - usually stuff you already know!
The only way to learn is to dig and surf!- Andrew Pitonyak has a lot of useful stuff.
I found OOo basic very obscure (after Lotus Script)
but here is how I create and size a table
cursor = docout.text.CreateTextCursor
Cursor.gotoEnd(False)
' OR if you are not creating the table in a blank document, you will need
' to navigate to the required spot.
' I have a marker text in my template which I 'find'
SearchDesc = Doc.createSearchDescriptor
SearchDesc.SearchCaseSensitive = false
SearchDesc.SearchWholeWords = True
SearchDesc.searchString = "<<TABLE GOES HERE>>"
cursor = Doc.findFirst(SearchDesc)'create Table to receive the church address
xTable = thiscomponent.createInstance( "com.sun.star.text.TextTable" )
xTable.initialize(1, 3) ' 1rows 3cols
cursor.Text.insertTextContent( cursor, xTable, false )
'clear borders
for i = 0 to 2
xtable.getcellbyposition(i,0).LeftBorder = BlankBorder
xtable.getcellbyposition(i,0).TopBorder = BlankBorder
xtable.getcellbyposition(i,0).BottomBorder = BlankBorder
next
xtable.getcellbyposition(2,0).Rightborder = BlankBorder
'set colum widths tcs = xtable.tablecolumnseparators
tcs(0).position = 1100
tcs(1).position = 8000
xtable.tablecolumnseparators = tcs
' Insert Text
' Col 0 Row 0
xtable.getcellbyposition(0,0).string = "some text I want in the table "
. . .etc
hope this helps
Herbert Eppel wrote:
I am trying to record a macro for setting the widths of table columns in OOo Writer (2.0 beta), but nothing is being recorded.
Is there a way of achieving this?
Alternatively, is there a way of making OOo adjust the column width automatically when converting (tab-delimited) text to a table?
OOo seems to set all columns to the same width, even with the option "Equal width for all columns" unticked.
Thank you.
Herbert Eppel www.HETranslation.co.uk
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
