Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-17-2014, 09:27 PM
wrdy wrdy is offline How to Find & Replace with horizontal rule? Windows XP How to Find & Replace with horizontal rule? Office 2007
Advanced Beginner
How to Find & Replace with horizontal rule?
 
Join Date: Jan 2014
Posts: 31
wrdy is on a distinguished road
Default How to Find & Replace with horizontal rule?

I have thousands of dictionary entries in a Word doc each separated as a paragraph. I now want to separate each entry with a horizontal rule. Can I automate this with Find & Replace?



Find:^p (paragraph mark)
Replace:

What do I need to replace with to create a horizontal rule? The HTML for the horizontal rule is:

HTML Code:
<hr size=2 width="100%" align=center>

Last edited by Charles Kenyon; 02-20-2014 at 05:02 PM.
Reply With Quote
  #2  
Old 02-18-2014, 12:25 AM
eNGiNe eNGiNe is offline How to Find &amp; Replace with horizontal rule? Windows 7 32bit How to Find &amp; Replace with horizontal rule? Office 2010 64bit
Expert
 
Join Date: Jan 2012
Location: Brussels [BE]
Posts: 746
eNGiNe is on a distinguished road
Default

If you use separate styles for terms and definitions (the way HTML has the dt/dd pair, for instance) you can include the rule in the style definition for the terms.

Given that you include html in your post, you could also use CSS to apply styling there – as long as you've applied styles in the Word file for the html conversion to pick up.
Reply With Quote
  #3  
Old 02-18-2014, 06:22 AM
wrdy wrdy is offline How to Find &amp; Replace with horizontal rule? Windows XP How to Find &amp; Replace with horizontal rule? Office 2007
Advanced Beginner
How to Find &amp; Replace with horizontal rule?
 
Join Date: Jan 2014
Posts: 31
wrdy is on a distinguished road
Default

Quote:
Originally Posted by eNGiNe View Post
If you use separate styles for terms and definitions (the way HTML has the dt/dd pair, for instance) you can include the rule in the style definition for the terms.

Given that you include html in your post, you could also use CSS to apply styling there – as long as you've applied styles in the Word file for the html conversion to pick up.
Are you saying that a horizontal rule can be applied with styles?

What I ended up doing was:

1. save docx file as filtered html
2. open html file with notepad, copy contents into a new docx file
3. Find:</p>, Replace:</p><hr>
4. copy contents into new notepad file and save with html extension
5. open html file with Word and save as docx file

This did the job.
Reply With Quote
  #4  
Old 02-18-2014, 08:39 AM
Charles Kenyon Charles Kenyon is offline How to Find &amp; Replace with horizontal rule? Windows 7 64bit How to Find &amp; Replace with horizontal rule? Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,533
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Glad you found a solution. For future reference, you can apply a top or bottom border as a part of a paragraph style. This acts as a horizontal rule. It will stretch from left indent to right indent (usually the page or column margins). By clicking on "More" in the Replace dialog, you can go to Format > Style to use the Replace function to replace or apply styles in a document. Styles are very much worth learning if you are using Word much at all.

Understanding Styles in Microsoft Word
Reply With Quote
  #5  
Old 02-19-2014, 08:42 PM
wrdy wrdy is offline How to Find &amp; Replace with horizontal rule? Windows XP How to Find &amp; Replace with horizontal rule? Office 2007
Advanced Beginner
How to Find &amp; Replace with horizontal rule?
 
Join Date: Jan 2014
Posts: 31
wrdy is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
Glad you found a solution. For future reference, you can apply a top or bottom border as a part of a paragraph style. This acts as a horizontal rule. It will stretch from left indent to right indent (usually the page or column margins). By clicking on "More" in the Replace dialog, you can go to Format > Style to use the Replace function to replace or apply styles in a document. Styles are very much worth learning if you are using Word much at all.

Understanding Styles in Microsoft Word
After your suggestion I tried doing it with a paragraph style. Worked well.

Thanks
Reply With Quote
  #6  
Old 02-20-2014, 04:59 PM
Charles Kenyon Charles Kenyon is offline How to Find &amp; Replace with horizontal rule? Windows 7 64bit How to Find &amp; Replace with horizontal rule? Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,533
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

You are welcome.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Find &amp; Replace with horizontal rule? Find Replace Adriano Word VBA 5 03-01-2013 04:09 AM
How to Find &amp; Replace with horizontal rule? Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM
How to Find &amp; Replace with horizontal rule? Is there a way to use "find/replace" to find italics words? slayda Word 3 09-14-2011 02:16 PM
How to Find &amp; Replace with horizontal rule? Find and Replace kjxavier Excel 3 08-12-2011 10:49 PM
How to Find &amp; Replace with horizontal rule? Help with find and replace or query and replace shabbaranks Excel 4 03-19-2011 08:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:04 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft