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

For Style...

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


Joined: 23 Jun 2009
Posts: 4

PostPosted: Tue Jul 07, 2009 4:55 am    Post subject: For Style... Reply with quote

Hi,

Iam opening the doc file through open office. For this iam doing in VBA. Now iam using "MakePropertyValue("CharFontName", "Arial")" to capture the font name.

Now i want to capture the style of the para. for this shall i use "CharStyleName". But i can't get the result....

Please suggest me.
Back to top
View user's profile Send private message
probe1
Moderator
Moderator


Joined: 18 Aug 2004
Posts: 2560
Location: Chonburi Thailand Asia

PostPosted: Tue Jul 07, 2009 6:06 am    Post subject: Reply with quote

Welcome to the forum.


You are trying to find out which font is used by a paragraph?
Create a text cursor, move to position, then query ...

Code:
oText = ThisComponent.Text
oTC = oText.createTextCursor()
oTC.goToEnd( FALSE )
print oTC.ParaStyleName




Does this help?


Get, install and use Xray to inspect objects and debug your code!

_________________
Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs
Back to top
View user's profile Send private message Visit poster's website
soubalaji
Newbie
Newbie


Joined: 23 Jun 2009
Posts: 4

PostPosted: Tue Jul 07, 2009 7:24 am    Post subject: Reply with quote

Hi,

I want to find the para contains the style "keywords". (i.e.) In a file there are so many para, in that i want to find the para contains the style "keywords".

How to find this.
Back to top
View user's profile Send private message
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