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

TextSection

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
tbloch
Newbie
Newbie


Joined: 20 Oct 2004
Posts: 2

PostPosted: Wed Oct 20, 2004 12:47 pm    Post subject: TextSection Reply with quote

How can I change the property of a TextSection in a writer document ?

I have a TextSection ("test"). The TextSection ist visible. Now I want to change the TextSection using OO-Macro to "IsVisible" = false.

How can I do this ? Who has an example in OO-Basic for me ?
Back to top
View user's profile Send private message
tbloch
Newbie
Newbie


Joined: 20 Oct 2004
Posts: 2

PostPosted: Thu Oct 21, 2004 1:55 am    Post subject: Reply with quote

I have found a way to do this. Here is an example in Visual Basic:


--->
Private Sub cmd_Bereich_Click()

Dim oSections As Object
Dim OOServiceManager As Object
Dim OOKernSpiegel As Object
Dim OODesktop As Object
Dim OODokument As Object

Set OOServiceManager = CreateObject("com.sun.star.ServiceManager")
Set OOKernSpiegel = OOServiceManager.createInstance("com.sun.star.reflection.CoreReflection")
Set OODesktop = OOServiceManager.createInstance("com.sun.star.frame.Desktop")
Set OODokument = OODesktop.getCurrentComponent()

Set oSections = OODokument.getTextSections()
oSections.getByName("test").IsVisible = True

exit sub
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 Writer 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