Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-21-2020, 04:05 PM
Guessed's Avatar
Guessed Guessed is offline Recording macro for Find Wildcard Windows 10 Recording macro for Find Wildcard Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Your macro does lots of settings but there is no .Execute appearing anywhere so I'm not surprised that nothing changes.

You don't need multiple steps if you simply apply a Paragraph Style when you find the character in question.
Code:
Sub Macro2()
  With Selection.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Replacement.Style = ActiveDocument.Styles("Heading 1")
    .Text = "."
    .Replacement.Text = "."
    .Forward = True
    .Wrap = wdFindContinue
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    .Execute Replace:=wdReplaceAll
  End With
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recording macro for Find Wildcard Wildcard to find any one or more words Maksymromaniuk Word 1 11-02-2015 01:04 PM
Need Help With Find and Replace Wildcard rsrasc Word VBA 9 10-13-2015 02:37 PM
Recording macro for Find Wildcard Find/Replace Wildcard Needed rsrasc Word VBA 4 11-11-2014 08:28 AM
Recording macro for Find Wildcard Wildcard Find and Replace Ulodesk Word 1 06-23-2014 10:26 AM
Recording macro for Find Wildcard Need help using WildCard Find & Replace Cayce Word 1 06-09-2014 04:17 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:00 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