| View previous topic :: View next topic |
| Author |
Message |
AlaskaHome1959 General User

Joined: 13 Apr 2006 Posts: 12
|
Posted: Thu Apr 13, 2006 6:30 pm Post subject: Iannz Find and Replace problem ????? |
|
|
| 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 |
|
 |
esperantisto Super User

Joined: 26 Dec 2003 Posts: 772 Location: Belarus
|
Posted: Fri Apr 14, 2006 6:03 am Post subject: Re: Iannz Find and Replace problem ????? |
|
|
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 |
|
 |
AlaskaHome1959 General User

Joined: 13 Apr 2006 Posts: 12
|
Posted: Sat Apr 15, 2006 7:04 am Post subject: |
|
|
| 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 |
|
 |
Bhikkhu Pesala Super User


Joined: 23 Aug 2005 Posts: 2324 Location: Seven Kings, London, UK
|
Posted: Sat Apr 15, 2006 9:32 am Post subject: |
|
|
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 |
|
 |
|
|
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
|