Ask Your Question
1

How do I set a keyboard shortcut to saving a version?

asked 2012-04-20 07:41:38 +0200

TJ Meneses gravatar image TJ Meneses
262 4 11 22

updated 2012-10-16 12:54:51 +0200

manj_k gravatar image manj_k
5962 4 35 53

Simple question. I'd like to do something like Ctrl+Alt+S (or really, just using Ctrl+S itself) to save a version, so that I don't have to a) manually use the dialog box every time or b) Close->Save using the "automatic" versioning feature in LO (can you hear the sarcasm dripping from my quotes?).

Pointing me in the right direction would be great; gimme step-by-step instructions, and I'll mark you as the correct answer.

delete close flag offensive retag edit

1 Answer

Sort by » oldest newest most voted
2

answered 2012-04-20 11:34:56 +0200

manj_k gravatar image manj_k
5962 4 35 53

updated 2012-04-20 15:28:46 +0200

In addition to → How does the "always save version when closing" under File -> Versions work?:

Saving a version w/o dialog box

You might add this (recorded) macro to My Macros, and assign it to a shortcut key (e.g.: Ctrl+T):

sub new_version
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "VersionComment"
args1(0).Value = ""

dispatcher.executeDispatch(document, ".uno:Save", "", 0, args1())

end sub

image description

That will enter Date and time and Saved by, w/o any comment. The dialog box will not be opened, only the 'save' progress bar will appear.

image description

You may deactivate ☐ Always save a version on closing (if you don't like it). ;)

link delete flag offensive edit

Login/Signup to Answer

Donate

LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2012-04-20 07:41:38 +0200

Seen: 186 times

Last updated: Apr 20 '12