Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-03-2023, 09:10 AM
East East is offline Check if sentence ends with a full stop Windows 10 Check if sentence ends with a full stop Office 2019
Novice
 
Join Date: Aug 2023
Posts: 7
East is on a distinguished road
Default

This should work, except when you have tables.



Code:
Sub AddFullStopToTerm()
    With ActiveDocument.Content.Find
        .ClearFormatting
        .Text = "(No restrictions apply)([!.])"
        .Replacement.ClearFormatting
        .Replacement.Text = "\1.\2"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = True
        .MatchSoundsLike = False
        .MatchAllWordForms = False
        .Execute Replace:=wdReplaceAll
    End With
End Sub
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Check if sentence ends with a full stop How to suppress double ".." at the end of a sentence when a name ends "Inc." dfolzenlogen Mail Merge 3 04-03-2022 08:49 PM
How do I add a missing full stop / period at the end of a paragraph? Helend269 Word VBA 2 10-08-2020 10:18 AM
Let bookmark check if there are empty bookmarks before and place sentence there? RevoMedia Word VBA 7 01-21-2020 08:04 AM
Check if sentence ends with a full stop Word 2016 - Where's Sentence length check RightPaddock Word 1 08-22-2017 02:30 PM
Check if sentence ends with a full stop Open a video on full screen after I click on a sentence ALFA_ENG PowerPoint 1 11-06-2015 01:17 AM

Other Forums: Access Forums

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