Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



How to implement search and replace list in OpenOffice?

Windows Software


Reply
 
Thread Tools Search this Thread
  #1  
Old 19-02-2012
Member
 
Join Date: Nov 2011
Posts: 61
How to implement search and replace list in OpenOffice?
  

in case I have entered adn rather than and, word with w0rd than I let me know how can apply the autocorrect feature for the file which has been saved on the disk? I wanted to apply the list of auto corrections file on system and let me know if you are having any specific solution to fix the matter.

Reply With Quote
  #2  
Old 19-02-2012
Member
 
Join Date: May 2011
Posts: 516
Re: How to implement search and replace list in OpenOffice?

Well I am suggesting below mentioned solution to fix the matter.
  • You have to click on Tools and click on Format and click on Auto correction option and click on apply button.
  • Also you should While Typing Option should be ON.
Reply With Quote
  #3  
Old 19-02-2012
Member
 
Join Date: May 2011
Posts: 410
Re: How to implement search and replace list in OpenOffice?

I donít think so above mentioned solution will work for you. according to me you have to install Macros on your system in order to carry out the replacement of the commands.
Reply With Quote
  #4  
Old 19-02-2012
Member
 
Join Date: Nov 2011
Posts: 61
Re: How to implement search and replace list in OpenOffice?

Ok thanks a lot for the prompt replies of yours. I tried the steps which you have stated over here and did not worked for me at all. you said over here about the Macros can you tell me how can I implement on the system?
Reply With Quote
  #5  
Old 19-02-2012
Member
 
Join Date: May 2011
Posts: 440
Re: How to implement search and replace list in OpenOffice?

I have posted below a macro file and steps to execute the same over here.
Code:
sub replacelist 
rem ---------------------------------------------------------------------- 
rem define variables 
dim document   as object 
dim dispatcher as object 
rem ---------------------------------------------------------------------- 
rem get access to the document 
document   = ThisComponent.CurrentController.Frame 
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") 

rem ---------------------------------------------------------------------- 
dim args1(18) as new com.sun.star.beans.PropertyValue 
args1(0).Name = "SearchItem.StyleFamily" 
args1(0).Value = 2 
args1(1).Name = "SearchItem.CellType" 
args1(1).Value = 0 
args1(2).Name = "SearchItem.RowDirection" 
args1(2).Value = true 
args1(3).Name = "SearchItem.AllTables" 
args1(3).Value = false 
args1(4).Name = "SearchItem.Backward" 
args1(4).Value = false 
args1(5).Name = "SearchItem.Pattern" 
args1(5).Value = false 
args1(6).Name = "SearchItem.Content" 
args1(6).Value = false 
args1(7).Name = "SearchItem.AsianOptions" 
args1(7).Value = false 
args1(8).Name = "SearchItem.AlgorithmType" 
args1(8).Value = 0 
args1(9).Name = "SearchItem.SearchFlags" 
args1(9).Value = 65552 
args1(10).Name = "SearchItem.SearchString" 
args1(10).Value = "teh" 
args1(11).Name = "SearchItem.ReplaceString" 
args1(11).Value = "the" 
args1(12).Name = "SearchItem.Locale" 
args1(12).Value = 255 
args1(13).Name = "SearchItem.ChangedChars" 
args1(13).Value = 2 
args1(14).Name = "SearchItem.DeletedChars" 
args1(14).Value = 2 
args1(15).Name = "SearchItem.InsertedChars" 
args1(15).Value = 2 
args1(16).Name = "SearchItem.TransliterateFlags" 
args1(16).Value = 1280 
args1(17).Name = "SearchItem.Command" 
args1(17).Value = 3 
args1(18).Name = "Quiet" 
args1(18).Value = true 

dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args1()) 

args1(10).Value = "t3h" 
args1(11).Value = "the" 

dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args1()) 

end sub

you can also add item at bottom of code just before end sub part.

args1(10).Value = "t3h" : rem to be replaced 
args1(11).Value = "the" : rem replacement 

dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args1())
  • You can use the below steps to install the macro code.
  • You have to select the entire code and copy the same.
  • Now go to Tools from OOo and select Macros.
  • Now you have to go for Organize Macros and click on OpenOffice.org.
  • After that expand My Macros and go for Standard. Now select Module1 sheet and go for Main entry and hit the Edit button.
  • Now choose default entries and paste it on the clipboard.
  • To run the document where Macros are supposed to apply.
  • Now go for Tools and go for Macros and over there Run Macro.
  • You have to expand My Macros library till you get macro name and click on Run button.
Reply With Quote
  #6  
Old 19-02-2012
Member
 
Join Date: Nov 2011
Posts: 61
Re: How to implement search and replace list in OpenOffice?

Another question which I wanted to ask you over here. what kind of program which I used to open below mentioned file?
C:\Documents and Settings\<USER>\Application Data\OpenOffice.org\3\user\autocorr\acor_en-US.dat
Reply With Quote
  #7  
Old 19-02-2012
Member
 
Join Date: Jun 2011
Posts: 780
Re: How to implement search and replace list in OpenOffice?

Well this is a zip archive and you have to change file extension to .zip file and after that you will require DocumentList.xml.
Reply With Quote
  #8  
Old 19-02-2012
Member
 
Join Date: Jun 2011
Posts: 470
Re: How to implement search and replace list in OpenOffice?

Another thing which I wanted to tell you over here is that you should use Altsearch extension to make the batch replace the command. It will help you to fast selection of preset regular as well as extended expressions. You can search or replace the text which can contain couple of paragraphs.
Reply With Quote
Reply

  TechArena Community > Software > Windows Software
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to implement search and replace list in OpenOffice?"
Thread Thread Starter Forum Replies Last Post
How to format numbered list in OpenOffice? He_Man Windows Software 3 19-02-2012 04:17 PM
Search and replace in Vim Xmen Operating Systems 5 08-03-2010 03:19 PM
Abstract class unable to implement List<T> MAHESA Software Development 5 02-03-2010 08:00 PM
Is there any free software which can search and replace in Outlook B_Hodge Windows Software 4 24-05-2009 11:13 PM
cmd command search and replace blindsleeper Operating Systems 2 27-11-2008 02:26 PM


All times are GMT +5.5. The time now is 04:46 PM.