#1
|
|||
|
|||
how remove "replace pop ups" in this macro?
this code converts auto numbering to manual numbering
and it uses recorded macro function for replacing tabs and multiple paragraph marks [some cleaning for my usage ] but the replace for whole document pop up is annoying tried to remove the line after "end with" but this breaks the code somehow Code:
Sub Macro1() ' ' Macro1 Macro ' ' Selection.WholeStory With ListGalleries(wdNumberGallery).ListTemplates(7).ListLevels(1) .NumberFormat = "%1." .TrailingCharacter = wdTrailingTab .NumberStyle = wdListNumberStyleArabic .NumberPosition = InchesToPoints(0.5) .Alignment = wdListLevelAlignLeft .TextPosition = InchesToPoints(0.75) .TabPosition = wdUndefined .ResetOnHigher = 0 .StartAt = 1 With .Font .Bold = wdUndefined .Italic = wdUndefined .StrikeThrough = wdUndefined .Subscript = wdUndefined .Superscript = wdUndefined .Shadow = wdUndefined .Outline = wdUndefined .Emboss = wdUndefined .Engrave = wdUndefined .AllCaps = wdUndefined .Hidden = wdUndefined .Underline = wdUndefined .Color = wdUndefined .Size = wdUndefined .Animation = wdUndefined .DoubleStrikeThrough = wdUndefined .Name = "" .SizeBi = wdUndefined .NameBi = "" .BoldBi = wdUndefined .ItalicBi = wdUndefined End With .LinkedStyle = "" End With ListGalleries(wdNumberGallery).ListTemplates(7).Name = "" Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _ ListGalleries(wdNumberGallery).ListTemplates(7), ContinuePreviousList:= _ False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _ wdWord10ListBehavior ActiveDocument.Range.ListFormat.ConvertNumbersToText Selection.WholeStory Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "^p^p" .Replacement.Text = " ^p" .Forward = True .Wrap = wdFindAsk .Format = False .MatchCase = False .MatchWholeWord = False .MatchKashida = False .MatchDiacritics = False .MatchAlefHamza = False .MatchControl = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "^t" .Replacement.Text = " " .Forward = True .Wrap = wdFindAsk .Format = False .MatchCase = False .MatchWholeWord = False .MatchKashida = False .MatchDiacritics = False .MatchAlefHamza = False .MatchControl = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll Selection.Copy End Sub |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Find and Replace" tool leaves out many of the occurrences of what I put in the "find" window | Swarup | Word | 8 | 06-24-2021 08:31 PM |
How to remove line between "Black" & "device"? | kingston123 | Excel | 10 | 06-14-2020 09:15 AM |
Replace "comma" with "and" in line of text | audioman | Word VBA | 7 | 01-21-2016 03:11 PM |
remove repeated words with " macro " or " wild cards " in texts with parentheses and commas | jocke321 | Word VBA | 2 | 12-10-2014 11:27 AM |
How to remove "Table of Figures" as we do to remove the "Table of Contents"? | Jamal NUMAN | Word | 1 | 07-08-2011 05:40 PM |