Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-26-2021, 04:22 PM
drrr drrr is offline how remove "replace pop ups" in this macro? Windows 10 how remove "replace pop ups" in this macro? Office 2019
Novice
how remove "replace pop ups" in this macro?
 
Join Date: Jul 2021
Posts: 9
drrr is on a distinguished road
Default 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
Reply With Quote
Reply



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 remove "replace pop ups" in this macro? 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

Other Forums: Access Forums

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


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