Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-20-2017, 07:27 AM
jeffreybrown jeffreybrown is offline Add a return between two square brackets Windows Vista Add a return between two square brackets Office 2007
Expert
Add a return between two square brackets
 
Join Date: Apr 2016
Posts: 673
jeffreybrown has a spectacular aura aboutjeffreybrown has a spectacular aura about
Default

In the end, this macro does exactly as needed...



Thanks to all...

Code:
Sub CleanUpBrakets()
    Application.ScreenUpdating = False
    With ActiveDocument.Range.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = False
        .text = "]^w["
        .Replacement.text = "]^l["
        .Execute Replace:=wdReplaceAll
        .text = "^w["
        .Replacement.text = "^l["
        .Execute Replace:=wdReplaceAll
    End With
    Application.ScreenUpdating = True
End Sub
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add a return between two square brackets Bold numbers between square brackets jeffreybrown Word 4 02-13-2017 04:32 PM
Add a return between two square brackets Help with: Replace and reformat numbers inside square brackets johnbrowny Word 1 02-13-2016 06:45 PM
Gray square brackets waldux Word 8 09-25-2013 04:14 PM
Add a return between two square brackets square brackets and grey background – why? eNGiNe Word 2 11-21-2012 01:06 AM
Add a return between two square brackets Filled square daksein Drawing and Graphics 4 06-21-2011 02:36 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:06 PM.


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