Alternative dialog Find & Replace for Writer (AltSearch)

Provider:
Tomas Bilek
Maintainer:
tombil
Rating:
4.292685
Average: 4.3 (41 votes)
Application:
Writer
Tags:
writer, Free, editing, search
Screenshots:
http://www.volny.cz/macrojtb/AltSearchScr_en.html
Post date:
Friday, 28 December, 2007 - 15:05
Statistics
Week: 204 - Month: 883 - Year: 11,460 - Timeline
Download extension
System Independent version - All releases
Compatible with OpenOffice 4: Yes
User feedback:
Compatible with OpenOffice 4.x?
  • Fast selection preset regular and extended expressions
  • Searched or replaced text can contain one or more paragraphs
  • Search out block of paragraphs delimited by two text marks
  • Multiple search and replacement in one step
  • Searching: Bookmarks, Notes, Text fields, Cross-references and Reference marks to their content, name or mark and their inserting
  • Searching and inserting Footnote and Endnote (from version OOo 2.3 only). It is possible to select at once texts of all footnotes or endnotes and to assign them any style
  • Searching object of Tables, Pictures and Text frames according to their name; it is possible to substitute them by any text, etc.
  • Changing into found or replaced text: paragraph style, character style, list style and Hyperlink's URL and set properties
  • Inserting and replacement: clipboard contents, insert replacement counter and page number
  • Hexadecimal also decimal submission character for search and replaced
  • Searching out manual page and column break and their set up or deactivation
  • Searching similarly or the same manually formatted part of text, according to cursor point
  • Count found occurrences
  • Redirecting result of replacing expression to the other text file
  • Batch mode: saving and loading of search and replacement parameters; it is possible to save several searching and replacing subsequently to the single sequence and that whole quickly execute after. Execute the batch with more opened text documents together.
  • Self dialogue for quick assignment of key shortcut to batches
  • Preserve capitalization - If found text begins with a capital letter, also the text replacement will begin with a capital letter
  • Searching for paragraph, character and list style; possibility to choose a style from the menu
  • Built-in help (http://www.volny.cz/macrojtb/HelpAltSearch_en.html)
  • Language: English, Czech, Russian, Spanish, German, French, Dutch, Italian
Alternative dialog Find & Replace for Writer (AltSearch)

Version Operating system Compatibility Release date
1.4 System Independent 3.4, 4.0 01/01/2014 - 12:55 More information Download
1.3.2 System Independent 3.4 17/06/2010 - 14:22 More information Download
1.3.1 System Independent 3.4 03/05/2010 - 15:21 More information Download
1.3 System Independent 3.4 25/11/2009 - 18:14 More information Download
1.2.2 System Independent 3.4 08/05/2009 - 17:37 More information Download
1.2.1 Windows, Linux, MacOS X 3.4 28/07/2008 - 15:28 More information Download
1.2 System Independent 3.4 12/07/2008 - 16:37 More information Download
1.1.2 Windows, Linux, MacOS X 3.4 24/04/2008 - 17:51 More information Download
1.1.1 Windows, Linux, MacOS X 3.4 07/03/2008 - 15:42 More information Download
1.1 Windows, Linux, MacOS X 3.4 13/02/2008 - 09:50 More information Download
1.0 Windows, Linux 3.4 28/12/2007 - 16:07 More information Download

Comments

Very good. At first try, I managed to do what I never succeeded to do with the OOo Find&Replace. The replacements are slower than with the native system, but it's quick enough.

Few bugs :
- in "Pick properties" button : the bottom of the text is eroded
- same problem for the "?" button
- when clicking on "?", I get the message "File of Help is impossible to open, etc." though it finds the file and opens it !
- I get two errors messages when I switch to the batch manager

I can give screenshots if you want.
email: trash.noreply{}gmail.com
I'll answer ;)

I cannot help you with eroding buttons. I guess it is a problem with system (memory?).

Problem with opening Help and Batch manager is a bug, produced probably by using of another localization then English or Czech. I will try to fix it to the nearest patch.

Tomas

I think that happens because the button is too narrow for same XP themes. See image:

http://img142.imageshack.us/img142/7352/findkz2.png

Best regards, and thanks for your useful extension.

VITRIOL

Yes, that the same erosion I have (Windows XP).

I have already understood it. I will fix it in the nearest patch.

Tomas

Hello I just downloaded your extension & tested it.
It works & I love it, really.
Just a note: when I tried to save a search as a batch, I get an error message:
Save option to file: Error opening file:
file:///home/rob/.openoffice.org2/user/config/AltSearchScript.txt
I. O:
Later I checked the file
/home/rob/.openoffice.org2/user/config/AltSearchEditor.ini
and I just had to change from 'notepad' to 'kwrite', and everything went as expected.

Incidentally, I could translate this excellent extension to french.

Thanks, I will try to look at it at Linux.

If you want to translate it pleases me but I recommend to wait for the nearest patch. I correct bugs there and it will be better prepared for translation.

Tomas

Hello,

This looks like a great thing, but for some reason, I can't get the batch mode to work. When I try to run a batch, it gives me an error message:
Bt_run: Unknown command: [Find], and the same for all others, i.e. [Replace], [Parameters], etc. It's probably not a mistake I made in writing the batch, since none of the built-in batches work either. The regular method (simply type the find and replace strings in the window) works fine, as does the counter.

Even when I save a command that already worked as a batch, I get the error when the batch is executed, since it makes the batch with the same syntax as used in the others.

Is there some setting that I missed?

By the way, the error disappears when I removed the brackets around the commands in the AltSearchScript file. But when I did that, the batch ran, but didn't actually do anything.

I'm running OOo 2.3.0 on Ubuntu 7.10

-Any sufficiently advanced technology is indistinguishable from magic. -- Arthur C. Clarke

I did not test it on Ubuntu and I cannot do it.
What localisation do you use?

Tomas

My language setting is U.S. English.

I will try it on Windows to see if it may be a bug in the 2.3 version (the other commenters seem to be using earlier variants).

-Any sufficiently advanced technology is indistinguishable from magic. -- Arthur C. Clarke

AltLinux 4.1, openoffice.org-2.4.0.8-alt1, AltSearch 1.1.2

$ locale
LANG=ru_RU.UTF-8

This is probably a bug of some versions of the Linux OOo - corrected version 1.2

http://img137.imageshack.us/my.php?image=bug018vd3.png
Literal translation:
"Syntax error BASIC.
Symbol Replace already been determined."

$ uname -rms ; pkg_info -Ex openoffice
FreeBSD 6.3-RELEASE i386
ru-openoffice.org-2.3.1

Hi, and thanks for your extension update.

But, on my system, the "Save batch" function doesn't work. The batch manager still empty, and the file AltSearchScript.txt file still at 0 byte.
I'm using AltSearch 1.1, OOo 2.3.1 Italian, Win XP HE SP2.

Thank you for your attention.

I have manually deleted the old empty AltSearchScript.txt, and now it works properly :-)
Thanks for your good work.

Localisation of AltSearch is possible in next steps:

1. Download files AltSearch_localisation_v1.1.ods and AltSearchHelp_1.1_en.html. First file contains (almost) all strings, second is help file in html format, created in OOo webWriter, I recommend to translate it just in OOo webWriter and keep used paragraphs and characters styles.

2. Finally send translated files to me, e-mail is inside first file.

When you start to translate it, please report it here, so someone else is not doing the same translation.

Thanks to everyone who offered translation.

Tomas

I started working on Italian localisation for this extension.
ETA: 1-2 weeks.
Cheers.
Emanuele Forner, Italy

We expect Russian localization of this excellent extension against the end of February.

German localization for AltSearch is done.

Updated files for localisation: AltSearch_localisation_v1.2.ods and AltSearchHelp_1.2ed_en.html. Changes compared to the previous version are marked with [v1.2].

Default file for batches (plain text in UTF8): AltSearchScript_en_1.2.txt.

I've started spanish localization some weeks ago.
It's almost done.

Really good extension.

Really good extension. It's very useful to convert texts form Writer to Spip. Thanks a lot.
S.

I really recommend this extension. It is very flexible, and it allows very complex search and replace operations.
I use it to search for broken cross-references. It is irreplaceable for this, as Writer does not offer any other possibility to do so!
Also, Tomas has put very much effort in the documentation, that I find very helpful indeed.

Just installed in 2.4.1 (linux) and find that the opened window for the macro is too small to be of use.

The box is cuts off just after "Extend" on the right, and just below "Match case" on the bottom.
Same problem in OOo 3.0 (M17).

The search box window shows correctly in OOo 2.3.1.

I think, it maybe caused by this OOo issue: http://www.openoffice.org/issues/show_bug.cgi?id=87596

The Extension I haven't tried yet. But I need to search for paragraphs and replace them by blanks or tabs. By copy and past I find a text an this text with several paragraphs has to be merged into one large block. It has to be guaranteed, that no paragraph sign is left inside the text.

Sometimes I need the opposite. Each blank or tab sign inside the text should be replaced by a paragraph sign, so that becomes one large column with one word in a line.

--
Moritz

AltSearch looks great, but when I try to run it in Writer I get the following error:

"BASIC runtime error.
An exception occurred.
Type: com.sun.star.container.NoSuchElementException
Message: ."
and the following line of code is highlighted.
GlobalScope.BasicLibraries.LoadLibrary("Tools") ' natahnout std. knihovnu

I'm using Windows XP SP2, OO.o version 2.4.1. I am not very experienced in OO Macros.

I suspect a library called Tools is missing; there is a library with that name in the OpenOffice.org Macros container, but it seems to contain no modules. If this is the problem, where can I find the modules?

I would very much like to use this extension, so could someone help me? Many thanks.

Probably you are missing BASIC library Tools. Try last version (1.2.1), which should be independent of this library.

You say (6th bullet) "It is possible to select at once texts of all footnotes or endnotes and to assign them any style".
I am using oOo 3.0.0 in XPproSP2 and am not a beginner - but need help now. I can get as far as [::BigBlock::] but cannot define "start" and "end" in a functional manner. Note 1 starts with "[superscript] 1Joel" and note 52 ends with "39-47" - both are unique instances. But "1Joel[::BigBlock::]39-47" does not "select all" - nor does "Joel[::BigBlock::]39-47" (ignore superscript).
If I can get this to work - with your help - how do I change the para style?
Note: this is done (hate to say it) in M$Word by: highlight any footnote, CTRL+A, format para - 3 clicks only.
Tnx - Paul

Look to Help (button [?]) on "footnote":
Using [::Footnote::]\\ with the button [ Find all ], the text of all FNs will be selected (handy for assigning a paragraph style to all FNs at once)

Paragraph styles selected block of text you can set using "Styles and formatting"

Tomas

Hi! I am interested to have a look at the course code but I was unable to find a link to it. Can someone please give me a hint? Thanks.

EDIT: Stupid me! It is about unpacking the oxt file. I am sorry!

This extension has been great, and I appreciate all of the documentation that goes with it - except I was unable to find documentation that explained how to simply replace some text in a regular font with a bolded font. Apparently this involves understanding internal OpenOffice character style attributes. (Does someone know of an easier way that I missed?) Hopefully this will help someone out in a similar situation...

I had text of the form "Region 1" or "Region 11" where I wanted to make every occurrence bold. Here's what I did:

Find (using Regular Expressions): ^Region\s([0-9][0-9]?)
Replace: \C{Quotation}\A{CharWeight=150%}\A{CharPosture=0}

The first part of the replace (\C{Quotation}) was added by choosing "Character Style" from the Replace drop-down list. The second parts were more difficult to determine. The general format of (\A{SOMETHING}) was listed in the replace drop-down as well, but neither CharWeight nor CharPosture were actual options in the PickProperties drop-down. I found that these were the actual options I needed to use by trial and error and eventually found what the available attributes were for each style by going to http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Text/Formatting. According to the wiki, while things like BOLD and NONE (for CharWeight and CharPosture respectively) are supposed to be valid options for these styles, neither would work and I had to use a numeric value.

The CharPosture part was necessary because whenever I used CharWeight to make the text bold, it automatically italicized the text as well. Including CharPosture=0 was necessary to make it un-italicized again. I'm not sure if this is a bug in OpenOffice or the extension, or just by-design.

Overall, I'm pleased at the power of this extension and it still saved me a lot of time and manual formatting... but there is still room for improvement in the documentation and in making it easier to use. All in all, thanks for making it!

(Using Alternative Find & Replace for Writer version 1.2.1 on OpenOffice.org 3.0.0)

To change the character or paragraph formatting, I use character / paragraph styles. In your case, I'd suggest to create a character style "bold" (or similar), then use the following syntax:

Find: region \d{1,}
Replace: &\C{bold}
Regular Expression: on

If you want to add to every occurance of "region" a ascending number, you may use the following syntax:

Find: region
Replace: & \i \C{bold}
Regular Expression: on
Replace all

"Replace all" is essential in this case, otherwise you will always get "region 0".

I just installed OpenOffice.org 3.1.1. I tried to install Mr. Bilek's AltSearch extension (which I've used extensively under OOo 2.4). The green binocular icon appears as expected, but clicking on it produces no response (including no error message). Any suggestions?

Thanks.

Mike

I have the same problem as Mike. Clicking on the green binoculars or accessing the menu does nothing, and does not produce an error message.

I have OOo 3.0.1 on Ubuntu 9.04, 64 bit version.

Sometimes it is necessary to restart OOo, including quickstarter (if is used).
In the worst case the entire operating system too.

There is an issue with searching within large paragraphs:
http://www.openoffice.org/issues/show_bug.cgi?id=108273

I wonder if you can make this excellent extension to work where the native one fails.

... and same error message:

"BASIC runtime error.
An exception occurred.
Type: com.sun.star.container.NoSuchElementException
Message: ."

but my highlighted line in the code reads:

oLibContainer.LoadLibrary(LibName)

(Just in case, I've tried the solution the author proposed in reply to the other comment, a previous version of the extension, but no luck)

Any idea what might be the problem, anybody? This extension is really useful, I'd hate to do without it!

Running OOo 3.1.1

Thanks

It was installed & working just fine on my system (SimplyMEPIS Linux 8.5, OOo 3.1.1) until I uninstalled the spreadsheet/database programs... It promptly started giving me the same error screen you described, and kept doing it until I decided to try reinstalling the "missing" programs -- at that point it started working again.

Hi - I love this extension, but since upgrading my system it won't install for me. I recently installed Ubuntu Lucid 10.04LTS, which comes with OOo 3.2 (OOO320m13, Build:9483, to be precise). The extension shows as installed under the Extension Manager, but no toolbar button or menu item is created. Is there anywhere I can file a bug report or get some support?

1. Make sure you have installed JRE - ooo Java Runtime Enviroment.
2. Sometimes it is necessary to restart OOo, including quickstarter (if is used). or whole operating system.

Hi - thanks for the response. I've switched the the sun java implementation from the Ubuntu partner repository, reconfigured everything, and done a full system restart, but I still can't find anything. There's no toolbar button, no menu entry, and no error of any kind. The Extension Manager still reports that the AltSearch extension is installed though. I've tried removing it and re-installing, also to no avail.

I don't really know how to debug it from here. Does anyone have this extension working on OOo 3.2? On Lucid?

[Edit: I can confirm too that I have the openoffice.org-java-common package installed]

On win XP and OOo 3.2 it is working OK.

Try direct run: Tools - Macros - Organize macros - OOo basic: My macros - Altsearch and direct run _Altsearch.

(try JRE instal by terminal: sudo apt-get install default-jre)

Hi tombil, thanks for your continued interest in this.

Well, it seems like it's an installation problem of some kind - Altsearch doesn't exist under "My Macros". Can I extract the macro manually from the package and add it myself? Is there a tool I can use to open the package? (File Roller reports "End-of-central-directory signature not found.", and `jar -x` just hangs.... know very little about java programming and nothing about OOo extensions, and don't have time to bone up right now!)

Thanks again!

on the basis of my last comment, it (finally) occurred to me that I might have a corrupt download, so I downloaded again, and sure enough the md5sums were different. Installation of the new file has proceeded as expected. (I'm getting a OOBasic runtime crash if I try to resize the window, but I don't think that issues is specific to this extension :)).

Sorry to have wasted your time, and thank again.

I cannot install version 1.3.1 into OOo_Dev300m80
I get the msg
(com.sun.star.uno.RuntimeException){{Message = "bad root element in file:
///Users/~/Library/Application Support/OOo-dev/3/user/uno_packages/cache/
uno_packages/7irZ2Z_/AltSearch.oxt/addon.mod", Context = (com.sun.star.uno.Xinterface)@0}}
-------------------
Al Maloney
Using OOo_Dev_DEV300 on Mac OS X 10.6.3
"Velox Versutus Vigilans"

I would really like to use this extension again.
Is it incompatible with my version of OOo?
Is there something I can do to resolve the problem?
(I have the same problem with TestFonts)
-------------------
Al Maloney
Using OOo_Dev_DEV300 on Mac OS X 10.6.4
"Velox Versutus Vigilans"

Thank you Tomas!
That works now.
Can you do the same for TestFonts?
-------------------
Al Maloney
Using OOo_Dev_DEV300 on Mac OS X 10.6.4
"Velox Versutus Vigilans"

Thank you so much, this extension is great!
Saved me many times ... the search and replace of Writer has several limitations.
Coming from MSWORD helped me a lot to get used to using Writer.
If you're looking for inspiration ...
http://gregmaxey.mvps.org/VBA_Find_And_Replace.htm
http://www.jambient.com/indexassistant/
This extension will recommend it to everyone! A must try!
Thank you again.