[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How can i make a menu item of open office invisible?

Posted on 2010-01-04
2
Medium Priority
?
710 Views
Last Modified: 2013-12-26
Hello dear experts....
happy new year.......

I have used Microsoft Word objects in  my programm, but i want to use open office.
After creating an open office object (below), i can not set (in other words use)  the properties of this open office object similar to word objects!
I want prgramatically  to disable/or make invisible the menu item "Save as" of open office.

Would you please help me , how can i set the options and parameters of an open office object?
I want also to use "form letter", "serial letter " and merge functionalities of open office object.


*----------------------  new code to substitute with codes for Microsoft word -----------------------------

            loOfcMgr = CreateObject("com.sun.star.ServiceManager")
            loDesktop = loOfcMgr.createInstance("com.sun.star.frame.Desktop")
            ** The args array is an array of "PropertyValue - objects - create by invoking OO.o reflection
            loCoreReflection = loOfcMgr.createInstance("com.sun.star.reflection.CoreReflection" )
            loPropertyValue = CREATEOBJECT("Empty")
            loCoreReflection.forName("com.sun.star.beans.PropertyValue").  createobject(@loPropertyValue)
            args[1] = loPropertyValue
            args[1].name = "Tessssssst"
            args[1].value = .T.







*--------------------------------- The existing code (for Microsoft word) -------- it works .....------------------------------
            cNewDokument = c_kuordner+'\'+ALLTRIM(c_datordner)+'\'+ALLTRIM(c_filename)+'.doc'
            THISFORM.Thermometer('Word wird geladen, bitte warten ..','1')

            cDat_typ = 1
            docstart=CREATEOBJECT("word.application")      && Kanal zu Word aufmachen
            docstart.documents.ADD      && dokument in Word laden
            docstart.ActiveDocument.SAVEAS('&cNewDokument')
            docstart.CAPTION ='JHM Word'
            docstart.commandbars("file").RESET
            docstart.commandbars("standard").RESET
            docstart.commandbars("view").CONTROLS(5).VISIBLE=.F.
            docstart.commandbars("file").CONTROLS(1).VISIBLE=.F.
            docstart.commandbars("file").CONTROLS(2).VISIBLE=.F.
            docstart.commandbars("file").CONTROLS(3).VISIBLE=.F.
            docstart.commandbars("file").CONTROLS(5).VISIBLE=.F.
            docstart.commandbars("file").CONTROLS(6).VISIBLE=.F.
            docstart.commandbars("Standard").CONTROLS(1).VISIBLE=.F.
            docstart.commandbars("Standard").CONTROLS(2).VISIBLE=.F.
            docstart.VISIBLE=.T.             && Word sichtbar machen
0
Comment
Question by:forscher
2 Comments
 
LVL 20

Accepted Solution

by:
ltlbearand3 earned 2000 total points
ID: 26186934
forscher,

I will see what I can do to try and assist.  In OOo you can disable toolbars via code, but I am not aware of anyway to disable the menu items via code.  These are typically set at start up and can be modified via OOo files on the system.

Check out these links:
http://wiki.services.openoffice.org/wiki/Documentation/Administration_Guide/Customizing_the_UI
http://wiki.services.openoffice.org/wiki/Documentation/Administration_Guide/Restricting_functionality

Please note that in OOo 3 that the directory is slightly different than listed on the Wiki
installdirectory\OpenOffice.org 3\Basis\share\config\soffice.cfg\modules\

For doing these other items, it is more getting to know the object you need.  I have not coded merge functionalities in OOo.  One good place to start in learning some OOo ojbects is http://www.pitonyak.org/AndrewMacro.pdf.  A good reference tool is http://api.openoffice.org/docs/common/ref/com/sun/star/module-ix.html.

-Bear
0
 

Author Closing Comment

by:forscher
ID: 31672310
Suppppppppppper
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
Suggested Courses
Course of the Month19 days, 11 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question