Thursday, 5 June 2014

Working with macros in OpenOffice

I decided to try to write a macro to help me strip the paragraph sign with three spaces that were left liberally interspersed in my document when I stripped it. To do this I recorded a macro.https://wiki.openoffice.org/wiki/Documentation/OOoAuthors_User_Manual/Getting_Started/Creating_a_simple_macro)  (see

I assigned a macro so that every time I press 'shift + f10' the macro will delete the paragraph symbol (actually a 'soft return' in this case) and the three spaces. Assigning a key stroke to the https://wiki.openoffice.org/wiki/Documentation/OOoAuthors_User_Manual/Getting_Started/Assigning_shortcut_keys macro was a bit tricky (see https://wiki.openoffice.org/wiki/Documentation/OOoAuthors_User_Manual/Getting_Started/Assigning_shortcut_keys )

Can I train it to search and destroy, I wonder? I expect many have trod these paths before.

Indeed- I have discovered that you can actually search a document for blank space, or other characters, http://word.mvps.org/faqs/general/FindingSpecialCharacters.htm so instead of using my macro I have just highlighted an example the characters I wanted to search for (which shows as three white spots together) and done a 'search and replace'. This did not work on the paragraph symbol that preceded them, but at least now I only have to manually delete that instead of four characters each time.

Et voila! apparently the soft return is called a 'manual line break' and this page tells you how to search and replace https://forum.openoffice.org/en/forum/viewtopic.php?t=42189
Hooray!

No comments:

Post a Comment