OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Iannz Find and Replace problem ?????

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
AlaskaHome1959
General User
General User


Joined: 13 Apr 2006
Posts: 12

PostPosted: Thu Apr 13, 2006 6:30 pm    Post subject: Iannz Find and Replace problem ????? Reply with quote

Has anyone noticed any issues with Iannz Find and Replace macro? I have noticed it will sometime delete characters at the begining of a paragraph--or even entire sections of paragraphs--when I use it to replace double paragraph marks with a single mark. This tends to limit it's usefullness for me, as one could imagine.
Back to top
View user's profile Send private message
esperantisto
Super User
Super User


Joined: 26 Dec 2003
Posts: 779
Location: Belarus

PostPosted: Fri Apr 14, 2006 6:03 am    Post subject: Re: Iannz Find and Replace problem ????? Reply with quote

I don't mention anything bad about it. The only inconvenience is that after a couple of OOo version upgrades, it's work has gotten quite unstable: often, it produces weird error messages. But still, I see no data loss.

AlaskaHome1959 wrote:
This tends to limit it's usefullness for me, as one could imagine.

You can't please everybody, right? Without that tool, however, the life would be even harder.
Back to top
View user's profile Send private message
AlaskaHome1959
General User
General User


Joined: 13 Apr 2006
Posts: 12

PostPosted: Sat Apr 15, 2006 7:04 am    Post subject: Reply with quote

Quote:
Without that tool, however, the life would be even harder.


True, and I do use the macro. But being that I have repeatedly experienced data lost by doing a mass find/replace for extended codes, I do have to use it in a more 'interactive' manner which does limit it's usefullness and makes the work of find/replace of extended codes harder than it would be if I could get it to work correctly.
Back to top
View user's profile Send private message
Bhikkhu Pesala
Super User
Super User


Joined: 23 Aug 2005
Posts: 2324
Location: Seven Kings, London, UK

PostPosted: Sat Apr 15, 2006 9:32 am    Post subject: Reply with quote

I found this snippet of code very useful for search and replace, though it is only for text and regex, not formatting codes or styles.

Just edit the arrays to change the find and replace strings.
Quote:
Sub Replace
oDoc = thisComponent
aFind = Array("\n", "","" ,"", "" ,"" ,"")
aReplace = Array( " ", "Ā", "ā", "Ī", "ī", "Ū", "ū")
aRayCount = 0
FandR = oDoc.createReplaceDescriptor
FandR.SearchCaseSensitive = true
FandR.SearchRegularExpression = true
While aRayCount <= uBound(aFind)
FandR.setSearchString(aFind(aRayCount))
FandR.setReplaceString(aReplace(aRayCount))
aRayCount = aRayCount + 1
oDoc.ReplaceAll(FandR)
Wend
End Sub
The above array values will replace all line-breaks with a space.
_________________
Fonts * Opera * Oo Tips * FAQ * New Forum
Oo 2.3.1 * Win XP
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group