![]() |
#31
|
|||
|
|||
![]()
The yellow is the failure message
Sub ReformatDocument() Application.ScreenUpdating = False Dim i As Long, j As Long, k As Long, l As Long, Str As String Dim RngDoc As Range, RngTmp As Range, RngVrs As Range, RngCmt As Range Dim bQuot As Boolean, SBar As Boolean, oPara As Paragraph bQuot = Options.AutoFormatAsYouTypeReplaceQuotes Options.AutoFormatAsYouTypeReplaceQuotes = False SBar = Application.DisplayStatusBar Application.DisplayStatusBar = True Set RngDoc = ActiveDocument.Range With ActiveDocument.Range With .Find .ClearFormatting .Replacement.ClearFormatting .Wrap = wdFindContinue .Format = True .Font.Italic = True .MatchWildcards = True .Text = "^13([!0-9]*^13)" .Replacement.Text = " ^l\1" .Execute Replace:=wdReplaceAll .Format = False .Text = "[ ]@^13" .Replacement.Text = "^p" .Execute Replace:=wdReplaceAll .Text = "[ ]{2;}" .Replacement.Text = " " .Execute Replace:=wdReplaceAll .Text = "\[[0-9]@\]" .Replacement.Text = "" .Forward = True .Wrap = wdFindStop .Format = False .MatchWildcards = True .Execute I attached the document |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
QA_Compliance_Advisor | Word VBA | 20 | 09-16-2014 07:29 AM |
AutoFill- Auto Change Certain things in document? | DaveWW00 | Word | 1 | 08-06-2013 11:33 AM |
How to change dates automatically | PaperBuster | Word | 5 | 09-24-2012 09:31 PM |
Automatically change the value of one cell so that two other cells become equal | matthew544 | Excel | 5 | 09-18-2011 08:56 AM |
How can I change the colors of cells automatically based on Job Completion? | Learner7 | Excel | 0 | 07-06-2010 10:47 PM |