Jonathan Kaye wrote:
Jonathan Kaye wrote:

<snip>
Hi Fernand,
Thanks for the reference. I had a look but there's a huge amount of
material and I didn't really see anything relevant to the situation I
described. Can you give me a hint as to how to define a substring of an
object that is itself an object and so can be formatted like an object.

Sorry to be thick but I couldn't really see anything in GetTexts that
deals with this.

Thanks again,
Jonathan
As a follow-up to my previous message, I can see that
oCell=oSheet.getCellByposition(0,0) 'A1
and then
oCell.CharWeight = com.sun.star.awt.FontWeight.BOLD
should make the contents of oCell bold. What I don't understand is how to
make a substring of oCell
   Position = InStr(oCell.getString(), ".")
   Mid(oCell.getString(), 1, Position - 1)
bold. I just want the substring starting from position 1 and stopping before
a fullstop. That's what I want bold but I don't know how to refer to that
substring so I can give it a CharWeight attribute.
ok: I supose you need TextRanges and therefore you need a Viewcursor or a TextCursor to select this Ranges who can tgakes different formating

i found in the same gimmicks section

Sub InsertStringToCell(sCellString as String, oCell as Object, sCellStyle as String)
Dim oCellCursor as Object
   oCellCursor = oCell.CreateTextCursor()
   oCellCursor.CharStyleName = sCellStyle
   oCell.Text.insertString(oCellCursor,sCellString,False)
   oDocument.CurrentController.Select(oCellCursor)
End Sub
I hope this is clearer.
Jonathan


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to