Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-18-2018, 07:45 AM
sipi1988 sipi1988 is offline Word 2016 - Find and replace message box need to be removed Windows 10 Word 2016 - Find and replace message box need to be removed Office 2016
Novice
Word 2016 - Find and replace message box need to be removed
 
Join Date: Jan 2018
Posts: 2
sipi1988 is on a distinguished road
Default Word 2016 - Find and replace message box need to be removed

Hi!

I have a macro mainly about find and replace, how could I eliminate the message box which always asks me to start the searching from the begining. I always have to click onto the no button several times. Would be nice if macro could do it instead of me.



Thanks in advance

Code:
Sub PDM_csillagos()
'
' PDM_csillagos Makró
'
'
    Selection.WholeStory
    Selection.PasteAndFormat (wdFormatPlainText)
    Selection.WholeStory
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = """"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindAsk
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "?"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindAsk
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "^p"
        .Replacement.Text = "*;"
        .Forward = True
        .Wrap = wdFindAsk
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "*;*"
        .Replacement.Text = "*;"
        .Forward = True
        .Wrap = wdFindAsk
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = ";*;"
        .Replacement.Text = ";"
        .Forward = True
        .Wrap = wdFindAsk
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.WholeStory
    Selection.Copy
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
In Find and Replace, can Word stop after each Replace? wardw Word 1 06-08-2017 02:47 PM
Word 2016 - Find and replace message box need to be removed MS Word 2016 Find and Replace BillM Word 2 03-14-2017 10:49 AM
Word 2016 - Find and replace message box need to be removed Multiple find and replace Word 2016 benpk1 Word VBA 5 03-01-2017 02:41 AM
Word 2016 - Find and replace message box need to be removed Need help using Find & Replace (MS Word) BZee Word 9 02-16-2015 05:45 PM
Word 2016 - Find and replace message box need to be removed Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:03 AM.


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