Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Vieri

What i would try is this. No idea whether it would work.

1.
Include the name of the document as the property  'Title' in the 'Description' 
tab of the properties dialog - File -> Properties. I believe this property 
won't change unless someone deliberately changes it. If this is a problem you 
might be able to find some other way of registering what the document should be 
called.

2.
write a macro that tests whether the name of the current document differs from 
that indicated by the above named "Title" from the properties;

3.
If it's different invoke the saveas option in the macro to "save as" it's 
correct name using the "Title" property and delete the document that the user 
saved;

4.
You could then display a dialog to give the user an explanation of 
what's happened. You could also put a time delay in the macro to act as a 
deterrent;


5.
invoke to the "Document is saved as" event.


Iain



On Tuesday 11 Jun 2013 00:36:59 Vieri wrote:
Hi,

I'm trying to do something apparently quite simple.
I'd like to disable the "save as" button in toolbar and menu and leave the
"save" action enabled. In other words, I'd like the user to just be able to
"save" and not "save as".

How can I do this?

I tried setting a custom macro so it's associated to the "save as" event.
I'd save the macro in the .odt (not application-wide). All's well except
for the fact that when the user tries to "save as" then the custom macro is
called AND the normal "save as" process is also called. My custom macro
just prints a message on the screen saying something like "Please SAVE,
don't SAVE AS". How can I "block" LO from my macro so it doesn't continue
with the standard "save as" procedure?

I tried deleting the "save as" entries from the Tools->customize sections
but it seems to remove "save as" at the app level, not at the document
level.

Any suggestions greatly appreciated,

Vieri

-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.