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


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

Posted on 2010-01-04
Medium Priority
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.CAPTION ='JHM Word'
            docstart.VISIBLE=.T.             && Word sichtbar machen
Question by:forscher
LVL 20

Accepted Solution

ltlbearand3 earned 2000 total points
ID: 26186934

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:

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.


Author Closing Comment

ID: 31672310

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