OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Change weight of some text being inserted into a text box

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
ultine
General User
General User


Joined: 08 Mar 2012
Posts: 9

PostPosted: Sat Mar 10, 2012 9:00 pm    Post subject: Change weight of some text being inserted into a text box Reply with quote

I have some text from a cell that is currently being inserted into a text box. The macro selects a cell, inserts that text into the text box, then selects another cell, and inserts that text into the box. That is all working fine.

Here is my problem: I would like to have some of the cell values be entered with bold text, but not all of them. When all is said and done, I would like to have a text box with a series of cell values in it, and some of those values will be bold.

Code:
oSheet.DrawPage(0).getControl.String = oSheet.DrawPage(0).getControl.String & " - " & sCellText


That line of code is nested in a loop (along with a bunch of other code) and sCellText is simply the selected cell's string value.

I assume (know) that I will need to have my text box set to have multiline and formatting turned on, but I have no idea how to get the string to be inserted as bold.

Any help is, as always, greatly appreciated Exclamation
Back to top
View user's profile Send private message Send e-mail
Robert Tucker
Moderator
Moderator


Joined: 16 Aug 2004
Posts: 3407
Location: Manchester UK

PostPosted: Sun Mar 11, 2012 2:08 am    Post subject: Reply with quote

Don't quite know how relevant this is to text boxes:

http://www.oooforum.org/forum/viewtopic.phtml?t=124239
_________________
OpenOffice 4.0.0 and LibreOffice 4.x.x on Fedora 20, Ubuntu 13.10, Windows 8.1 Preview (Triple Boot)
Back to top
View user's profile Send private message
ultine
General User
General User


Joined: 08 Mar 2012
Posts: 9

PostPosted: Sun Mar 11, 2012 11:07 pm    Post subject: Reply with quote

Thanks, Robert, that looks like it could be helpful. I will check it out more over the next few days. If anyone else has different input, it is still welcome, but that link certainly seems to have some of the syntax I was looking for.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group