Page 1 of 1
Clean Form
Posted: Sat Jun 28, 2008 9:42 pm
by Scramasax
Is there a way to have a form displayed without all the writer toolbars and menus? (A form in a simple window.) My clients are in the construction biz and they don't dig all the clutter.
Any help is greatly appreciated.

Re: Clean Form
Posted: Tue Jul 08, 2008 3:24 am
by QuazzieEvil
try the following:
Code: Select all
Sub removeUnwantedToolbars(Event As Object)
Dim Doc As Object
Dim Frame As Object
Dim Layout As Object
Dim Element As Object
Dim I As Integer
Dim strURL As String
Dim Allowed
Dim CDA(4) As New com.sun.star.beans.PropertyValue
'Allowed=Array("private:resource/menubar/menubar","private:resource/toolbar/formsnavigationbar")
Doc=Event.Source.Parent.Parent
'xray doc
Frame=Doc.CurrentController.Frame
Layout=Frame.LayoutManager
For I=0 To UBound(Layout.Elements)
strURL=Layout.Elements(I).ResourceURL
'If Not isIN(strURL,Allowed) Then
Layout.hideElement(strURL)
'End If
Next I
End Sub