#1
|
|||
|
|||
Convert Border Line to Under line chars
Hello all,
I have about 5k word files that have inconsistent lining. Some files have Border Lines, some have underscore lines and some have a combination of both. I would like to convert all Border Lines into the Underline Characters. I tried to record a macro to undo the AutoMatic formatting that changed the underscores to Border Lines but the little lightning thing went away every time I hit the record button. Please advise |
#2
|
||||
|
||||
So we don't spend time trying to change the wrong kind of borders, can you attach a document to a post with some representative content (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thank you! File attached.
|
#4
|
||||
|
||||
Try the following macro:
Code:
Sub Demo() Application.ScreenUpdating = False Dim i As Long With ActiveDocument.Range With .Find .ClearFormatting .Replacement.ClearFormatting .Text = "[^13]{2,}" .Replacement.Text = "" .Forward = True .Wrap = wdFindStop .Format = False .MatchWildcards = True .Execute End With Do While .Find.Found For i = 1 To .Paragraphs.Count With .Paragraphs(i) If .Borders(wdBorderBottom).LineStyle <> wdLineStyleNone Then .Borders(wdBorderBottom).LineStyle = wdLineStyleNone .Range.InsertBefore "______________________" & _ "________________________________________" & _ "_________________________________________" End If End With Next .Collapse wdCollapseEnd .Find.Execute Loop End With Application.ScreenUpdating = True End Sub For Mac macro installation & usage instructions, see: http://word.mvps.org/Mac/InstallMacro.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
You are da man! It works like a charm. Thank you.
|
Tags |
formatting, macro |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Drawing a border/line in a table | Bluie | Word | 3 | 10-24-2016 05:31 AM |
Use character instead of line for table border | dlowrey | Word Tables | 6 | 03-09-2015 11:29 AM |
How to draw double line border for a Cell | phamh | PowerPoint | 2 | 10-21-2014 02:26 PM |
[Q] Horizontal border-lines after each text-line | subscriber | Word | 2 | 05-14-2014 07:17 AM |
Need to remove a line that isn't a cell border | msbytes | Word | 4 | 08-15-2011 09:21 AM |