Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-01-2020, 05:01 AM
jeffreybrown jeffreybrown is offline Change Font Italic or normal from one point Windows 10 Change Font Italic or normal from one point Office 2016
Expert
 
Join Date: Apr 2016
Posts: 673
jeffreybrown has a spectacular aura aboutjeffreybrown has a spectacular aura about
Default

How about

Code:
Sub DeleteBoldItalics()
    Selection.HomeKey Unit:=wdStory
    With Selection.Find
        .ClearFormatting
        .MatchWildcards = True
        .Text = "Title and subtitle at the date of [0-9]{2,}.[0-9]{2,}.[0-9]{4,}"
        .Execute
        .Text = "Title and subtitle at the date"
        .Replacement.Text = "Title and subtitle"
        .Forward = True
        .Wrap = wdFindStop
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
        .Execute Replace:=wdReplaceAll
    End With
    With Selection.Find.Replacement.Font
        .Bold = True
        .Italic = True
    End With
    With Selection.Find
        .Text = "Title and subtitle"
        .Replacement.Text = "Title and subtitle"
        .Forward = True
        .Wrap = wdFindStop
        .Format = True
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
        .Execute Replace:=wdReplaceAll
    End With
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
PowerPoint macro to change words between quotes to italic needed KarenK13 PowerPoint 9 01-12-2020 12:59 PM
Change Font Italic or normal from one point Font will not lose Italic. Corruption? Ulodesk Word 2 07-25-2016 06:01 AM
Opening doc in Word 2010 causes normal template to change - font size incorrect Simonb Word 4 01-26-2016 03:52 PM
Change Font Italic or normal from one point Help with drop down menu changing Italic font when unlinked brent chadwick Word VBA 3 11-24-2015 12:48 PM
Change Font Italic or normal from one point Change font & point size? markg2 Outlook 2 06-09-2010 03:23 PM

Other Forums: Access Forums

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