| View previous topic :: View next topic |
| Author |
Message |
tbloch Newbie

Joined: 20 Oct 2004 Posts: 2
|
Posted: Wed Oct 20, 2004 12:47 pm Post subject: TextSection |
|
|
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 |
|
 |
tbloch Newbie

Joined: 20 Oct 2004 Posts: 2
|
Posted: Thu Oct 21, 2004 1:55 am Post subject: |
|
|
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 |
|
 |
|