[Solved] Macro that activate ctrl+s
[Solved] Macro that activate ctrl+s
is it possible to create macro that activate ctrl+s every time a cell is changed in a CALC document?
Or every time ENTER is hit (if the CELL version is not possible).
Or every time ENTER is hit (if the CELL version is not possible).
Last edited by MrProgrammer on Sat Aug 13, 2022 4:31 am, edited 1 time in total.
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
open office 4.1.11
Re: Macro that activate ctrl+s
If you would use a database, you would never have to save any file. A database stores every modifed row to disk when you move to another row.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Macro that activate ctrl+s
Yes, it is possible, but it means a too frequent saving procedure for a large spreadsheet document. It may become impossible to work with the document.is it possible to create macro that activate ctrl+s every time a cell is changed in a CALC document?
Or every time ENTER is hit (if the CELL version is not possible).
There are Event in the Customize feature: 'Modified' status was changed.
Assign your saving macro to it.
Be careful. An infinite loop can be created.
The sample document contains a sample macro, what saves the documents after every changing the document content.
Note: the macro was created IN LibreOffice FOR LibreOffice. Maybe the API and the Events in the Apache OpenOffice are different today.
Last edited by Zizi64 on Sat Aug 06, 2022 1:41 pm, edited 3 times in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Macro that activate ctrl+s
And you can write your own Listeners for a partial cell range. See Andrew Pitonyak's free macro books.if the CELL version is not possible
https://www.pitonyak.org/oo.php/
...or search in this Forum:
https://forum.openoffice.org/en/forum/s ... &sr=topics
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Macro that activate ctrl+s
Here is an 'improved' sample code of the macro.The Save procedure will be active after 10 change of the content.
Note (again): It works in the LibreOffice only.
Note: The original "Content changed" display on the LibreOffice 'Save' icon becomes unusable when you apply this macro.
Note (again): It works in the LibreOffice only.
Code: Select all
REM ***** BASIC *****
Option explicit
Global const myLimit = 10 'The Autosave works after 10 content change
Global myCounter as double
Sub myAutoSave
' AutoSave When Modified State Raised more than 10 times
dim oDoc as object
oDoc = ThisComponent
if (oDoc.isModified) Then
myCounter = myCounter + 0.5 'This increase command - somehow - will be run twice in a single loop
if myCounter >= myLimit then
if (oDoc.hasLocation AND (Not oDoc.isReadOnly)) Then
oDoc.store()
myCounter = 0
else
oDoc.setModified(False)
end if
else
oDoc.setModified(False)
end if
end if
End Sub
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Macro that activate ctrl+s
You need install the LibreOffice for this task. At least a portable version of it.Thanks... will have a look of the examples.
__________________________
open office 4.1.11
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Macro that activate ctrl+s
yes I understood that...
Dont know Libre or what the diff. is compared to openoffice
But will look at it
Dont know Libre or what the diff. is compared to openoffice
But will look at it
open office 4.1.11
Re: Macro that activate ctrl+s
LibreOffice was forked of the OpenOffice at the version 3.3. LO has a much more active (volunteer) developer team. The latest Fresh version is 7.3.5, but it is better to use the latest Still version. LO has many new features and functions, modified appearance and behavior; there are fixed lots of bugs (and raised some new bugs)...Dont know Libre or what the diff. is compared to openoffice
https://www.libreoffice.org/download/download/
https://en.wikipedia.org/wiki/LibreOffice#History
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Macro that activate ctrl+s
This works with no problem under OpenOffice 4.1.13 and Windows 10
- Attachments
-
- AutoSave.ods
- (9.92 KiB) Downloaded 95 times
Co-admin french forum branch
Re: Macro that activate ctrl+s
yes this is perfect
It's working fine.
But is it someone I can edit in?
maybe I would like to save after 5 cells and maybe remove the save box showing..
tried to go to tools > macros > administrate
but get stuck there
Assume I have to open it up in some kind of program to edit it.
Edit: Discussion about editing the macro is continued in topic Edit a macro -- MrProgrammer, forum moderator |
It's working fine.
But is it someone I can edit in?
maybe I would like to save after 5 cells and maybe remove the save box showing..
tried to go to tools > macros > administrate
but get stuck there
Assume I have to open it up in some kind of program to edit it.
open office 4.1.11