|
Removing marked text
From NeoWiki
(Difference between revisions)
Revision as of 08:44, 1 February 2006 (edit) Sardisson (Talk | contribs) m (category) ← Previous diff |
Revision as of 08:19, 16 February 2006 (edit) (undo) Sardisson (Talk | contribs) m (de) Next diff → |
||
Line 17: | Line 17: | ||
''This macro was written by Fabrizio Venerandi (with a small improvement by Matteo Cavalleri) and suggested at the [http://trinity.neooffice.org/modules.php?name=Forums&file=viewtopic&t=2040 NeoOffice forums]'' | ''This macro was written by Fabrizio Venerandi (with a small improvement by Matteo Cavalleri) and suggested at the [http://trinity.neooffice.org/modules.php?name=Forums&file=viewtopic&t=2040 NeoOffice forums]'' | ||
+ | |||
+ | {{botlangbarEN|[[De:Markierte_Textabschnitte_entfernen|Deutsch]]}} | ||
[[Category:NeoOffice]][[Category:Tips and Hints]] | [[Category:NeoOffice]][[Category:Tips and Hints]] |
Revision as of 08:19, 16 February 2006
NeoOffice has powerful search and replace functions, but removing various section of marked ([bracketed] text, for instance) cannot be done with the basic functions.
You could use the following macro for this:
sub seekanddestroy4 dim seek seek = thiscomponent.createReplaceDescriptor() seek.SearchString = "\[[^\[\]]+\]" seek.ReplaceString = "" seek.SearchRegularExpression=True thiscomponent.ReplaceAll(seek) end sub
The macro will seek all sections of text in brackets [like a suggestion for different text] and replace these with an empty string [no characters].
This macro was written by Fabrizio Venerandi (with a small improvement by Matteo Cavalleri) and suggested at the NeoOffice forums
This article in other languages: Deutsch