Hello,

This is my first post ...
I am trying make a macro that basically browses a calc document, retrieves
some text strings and writes theim in a writer document. Those strings
should be formated as either say "Title2" or "Text Body", but I didn't find
methods to do so. The way I am currently writing the writer document is :

'getting the  document  and text object
Doc1 = ThisComponent
texte = Doc1.Text
'creating a cursor
cursor = texte.createTextCursor()
'change the char weight instead of changing the global paragraph style
cursor.CharWeight = com.sun.star.awt.FontWeight.BOLD
texte.insertString(cursor, "The bold face string" + Chr(13), 0 )
cursor.CharWeight = com.sun.star.awt.FontWeight.NORMAL

Is it feasable to just switch from a "global" format to another?

Pantxo

-- 
For unsubscribe instructions e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to