I have a macro created which calls the Find/Replace, looks for the dreaded ellipsis character, and replaces it with 3 periods - using Replace All to scan the entire document. Works nicely.
But, to run it from the menu (Tools -> Macros -> Run Macro...) is a bit clunky.
So I'd like to run the macro by assigning it to a keystroke (or combination using Alt or Ctl or Shift), which would run the macro
How can I do that? Or, can you supply a link to the right documentation to learn how?
Thanks!
[Solved] how to Run a macro with a keystroke
-
- Posts: 5
- Joined: Wed Aug 14, 2019 9:02 pm
[Solved] how to Run a macro with a keystroke
Last edited by robleyd on Sat Aug 31, 2019 2:23 am, edited 2 times in total.
Reason: Add green tick
Reason: Add green tick
Open Office 4.1.5 on Windows Surface
Re: how to Run a macro with a keystroke (assign macro to key
menu:Tools>Customize...
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: how to Run a macro with a keystroke (assign macro to key
In the customize menu you can add your macro to an existing toolbar, or you can create your own toolbar. You can use the built-in icon set, or you can import new icons.
You can assign the new toolbar to the actual document only, or you can assign it to the actual AOO/LO application.
You can assign the new toolbar to the actual document only, or you can assign it to the actual AOO/LO application.
Last edited by robleyd on Thu Aug 29, 2019 9:10 am, edited 1 time in total.
Reason: Typo
Reason: Typo
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: how to Run a macro with a keystroke (assign macro to key
The newer LibreOffice versions have a new feature: You can customize the floating menus (right click menus) too: you can assign your macro as a new item to a floating menu.
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: how to Run a macro with a keystroke (assign macro to key
You can add a macro to a Toolbar as well, also using Tools menu/customize. You can stop the ellipsis character replacing 3 periods when you type them by going to format menu/autocorrect/autocorrect options and deleting that entry.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
-
- Posts: 5
- Joined: Wed Aug 14, 2019 9:02 pm
Re: how to Run a macro with a keystroke (assign macro to key
Thanks for all the responses!
I had already learned how to stop making ellipses, thanks. However, I have a database of ~ 4000 documents that have ellipses on them; my task is to remove them. Sort of like the Augean Stables of editing... and why I would like to attach the Macro to a key.
So it appears from the responses that the Macro could be assigned to / invoked from a menu, or toolbar. Hmmm GUI jail? No way to attach it to a keystroke or sequence so no mousing would be needed?
Am I correct that a macro can NOT be attached to a key, or am I misinterpreting something?
I had already learned how to stop making ellipses, thanks. However, I have a database of ~ 4000 documents that have ellipses on them; my task is to remove them. Sort of like the Augean Stables of editing... and why I would like to attach the Macro to a key.
So it appears from the responses that the Macro could be assigned to / invoked from a menu, or toolbar. Hmmm GUI jail? No way to attach it to a keystroke or sequence so no mousing would be needed?
Am I correct that a macro can NOT be attached to a key, or am I misinterpreting something?
Open Office 4.1.5 on Windows Surface
Re: how to Run a macro with a keystroke (assign macro to key
The macro can be attached to a key. Go to Tools menu/customise/Keyboard
In the category section choose openoffice macros and find the macro you want to assign the key combination to.
Edit: if you've got 4000 documents opening each and running a macro will be tedious.
You might want to write a macro that finds/opens them all and does the search and replace for you.
Edit 2:
something like this except with a list of all your file paths or you could use the Dir function to find the files.
In the category section choose openoffice macros and find the macro you want to assign the key combination to.
Edit: if you've got 4000 documents opening each and running a macro will be tedious.
You might want to write a macro that finds/opens them all and does the search and replace for you.
Edit 2:
something like this except with a list of all your file paths or you could use the Dir function to find the files.
Code: Select all
filepath = "c:\yourfolder\yourdocname.odt"
doc=StarDesktop.loadComponentFromURL(ConvertToURL(filepath),"_blank",0,Array())
'do your search and replace
doc.store
doc.close(true)
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
-
- Posts: 5
- Joined: Wed Aug 14, 2019 9:02 pm
Re: how to Run a macro with a keystroke (assign macro to key
JeJe Thank you, that's what I was looking for.
- I did not see the Keyboard tab; it only appears (in Apache OO) if you have a document (e.g. Text Document) open; if you just proceed from the menu that tab doesn't appear in Tools->Customize. Anyway I found it. Got the macro assigned to the key sequence Ctl-Space. Works great.
And many thanks for the bonus macro to do 'em all in one fell swoop. I will get deeper into that after the holiday weekend (Labor Day here in the states).
Excellent solutions.
- I did not see the Keyboard tab; it only appears (in Apache OO) if you have a document (e.g. Text Document) open; if you just proceed from the menu that tab doesn't appear in Tools->Customize. Anyway I found it. Got the macro assigned to the key sequence Ctl-Space. Works great.
And many thanks for the bonus macro to do 'em all in one fell swoop. I will get deeper into that after the holiday weekend (Labor Day here in the states).
Excellent solutions.
Open Office 4.1.5 on Windows Surface