Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-09-2017, 06:20 AM
lonesoac0 lonesoac0 is offline Convert Border Line to Under line chars Windows 7 64bit Convert Border Line to Under line chars Office 2013
Novice
Convert Border Line to Under line chars
 
Join Date: Oct 2015
Posts: 10
lonesoac0 is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 01-09-2017, 02:42 PM
macropod's Avatar
macropod macropod is offline Convert Border Line to Under line chars Windows 7 64bit Convert Border Line to Under line chars Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 01-09-2017, 02:56 PM
lonesoac0 lonesoac0 is offline Convert Border Line to Under line chars Windows 7 64bit Convert Border Line to Under line chars Office 2013
Novice
Convert Border Line to Under line chars
 
Join Date: Oct 2015
Posts: 10
lonesoac0 is on a distinguished road
Default

Thank you! File attached.
Attached Files
File Type: docx 123.docx (15.5 KB, 7 views)
Reply With Quote
  #4  
Old 01-09-2017, 04:48 PM
macropod's Avatar
macropod macropod is offline Convert Border Line to Under line chars Windows 7 64bit Convert Border Line to Under line chars Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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 PC macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm
For Mac macro installation & usage instructions, see: http://word.mvps.org/Mac/InstallMacro.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 01-09-2017, 05:26 PM
lonesoac0 lonesoac0 is offline Convert Border Line to Under line chars Windows 7 64bit Convert Border Line to Under line chars Office 2013
Novice
Convert Border Line to Under line chars
 
Join Date: Oct 2015
Posts: 10
lonesoac0 is on a distinguished road
Default

You are da man! It works like a charm. Thank you.
Reply With Quote
Reply

Tags
formatting, macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Border Line to Under line chars Drawing a border/line in a table Bluie Word 3 10-24-2016 05:31 AM
Convert Border Line to Under line chars Use character instead of line for table border dlowrey Word Tables 6 03-09-2015 11:29 AM
Convert Border Line to Under line chars How to draw double line border for a Cell phamh PowerPoint 2 10-21-2014 02:26 PM
Convert Border Line to Under line chars [Q] Horizontal border-lines after each text-line subscriber Word 2 05-14-2014 07:17 AM
Convert Border Line to Under line chars Need to remove a line that isn't a cell border msbytes Word 4 08-15-2011 09:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:44 AM.


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