I am trying to quality control some updated house style documents and wondered whether there was a quick way of checking for missing full stops (or semi-colons for lists) at the end of paragraphs or to just highlight the paragraph marks that have no punctuation. Thanks Shelley
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Missing full stops and semicolons at end of paragraphs in Word 2010
Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Missing full stops and semicolons at end of paragraphs in Word 2010
- This topic has 18 replies, 6 voices, and was last updated 8 years, 8 months ago.
AuthorTopicWSLady-Laughsalot
AskWoody LoungerMarch 22, 2016 at 6:35 am #504989Viewing 4 reply threadsAuthorReplies-
MrJimPhelps
AskWoody MVPMarch 22, 2016 at 10:30 am #1556911What is a “full stop”?
If you know exactly what character should (or should not) be in a certain spot, you can do a manual search for those characters. You could also do a Find-and-Replace, to replace the incorrect characters with the correct ones.
Group "L" (Linux Mint)
with Windows 10 running in a remote session on my file server -
Charles Kenyon
AskWoody LoungerMarch 22, 2016 at 12:00 pm #1556927A full stop is what I call a period. (Like the one at the end of the previous sentence.)
I do not know how to search for everything except a certain character.
Turning ondisplay of non-printing formatting marksmay help.
-
MrJimPhelps
AskWoody MVPMarch 22, 2016 at 2:03 pm #1556941A full stop is what I call a period. (Like the one at the end of the previous sentence.)
I was thinking more along the lines of CR-LF (carriage return – line feed). You could likely search for that, since it is a specifically-defined character string.
I do not know how to search for everything except a certain character.
I guess I was unclear — I meant to say search for specific characters, whether they are the ones you want to keep or the ones you want to eliminate.
Turning ondisplay of non-printing formatting marksmay help.
Ah! Reveal Codes! I’ve been looking for Reveal Codes for years in Word, and all this time it was right in front of me.
Group "L" (Linux Mint)
with Windows 10 running in a remote session on my file server -
WSMartin@DocProd
AskWoody LoungerMarch 23, 2016 at 2:55 am #1557006Hi
I worked on a series of punctuation fix tools a year or two ago. My focus was to apply and correct punctuation in bulleted lists, especially styles that used “;” or “,” and want the second to last line to have “; and” inserted and the last line ending in “.”. I found doing this to be a pain, especially when I had to edit the list and then reapply the “,and” rules. With the tool, all you need to do is hit a shortcut key anywhere in the list and the rule format is correctly reapplied to the list – it saves a great deal of low value editing time.I don’t leave many body text paragraphs without a training “.” character. What I do find is that when I use tables to quickly record information, I often forget the “.” and may leave an extra blank line at the end of the cell. I developed another tool which adds the “.” to cell paragraphs if it is missing, and removes these blank lines for each of the selected cells in a table. This is a real time saver as it can process an entire table in one keystroke.
In both cases the tools step through each paragraph checking the last character. This isn’t as slow as it may sound. One of the challenges is determining the boundaries of a bulleted list so only that list is processed, especially in document with numbered paragraphs. As always, doing this in the context of table cells also has its challenges, because Word uses hidden characters to denote cell boundaries.
I have added the driving loop for the punctuation fix and table format code below to give some idea of the processing. There are other supporting routines not shown because because there is a lot of exception handling. You can download the full routines for free at DocumentProductivity. There are many other word editing enhancements also available there.
Code:[SIZE=1]Private Sub wrkPunctFix(iPara As Long, ilastPara As Long, iMethod As Integer) ‘========================================================================================================================= [B]‘Fixes the punctuation for the paragraph and format type passed[/B] ‘Release 09 Aug 2014 Martin Coomber documentproductivity.blogspot.co.nz ‘Deletes trailing and, then deletes any existing punctuation ‘Then adds the punctuation characters required for each rule ‘========================================================================================================================= Dim iChar As Integer Dim rPara As Range Dim sInputVal As String Dim bDeleteWrongTerminatingChar As Boolean Set rPara = ActiveDocument.Paragraphs(iPara).Range ‘Process the start of the Para If iMethod = 3 Then rPara.Characters(1).Select If Selection.Range.Case = wdLowerCase _ Then Selection.Range.Case = wdUpperCase End If ‘Now process text at the end of the line – works for end table cell too iChar = rPara.Characters.Count – 1 ‘dont process end of para character While rPara.Characters(iChar).Text = ” ” rPara.Characters(iChar).Select Selection.Delete ‘ but does not seem to delete the last space in a para iChar = iChar – 1 ‘ Handle blanks at end and table cChars Wend ‘Delete and rPara.Characters(iChar).Select Selection.MoveStart Unit:=wdCharacter, Count:=-3 If Selection.Text = ” and” Then Selection.Delete Unit:=wdCharacter, Count:=1 iChar = iChar – 4 End If ‘Delete terminating character If InStr(“.;, “, rPara.Characters(iChar).Text) > 0 Then rPara.Characters(iChar).Select Selection.Delete Unit:=wdCharacter, Count:=1 iChar = iChar – 1 End If rPara.Characters(iChar).Select Select Case iMethod ‘ now add characters Case 1 ‘; If iPara (ilastPara) Then Selection.InsertAfter “;” If iPara = (ilastPara – 1) Then Selection.InsertAfter ” and” If iPara = (ilastPara) Then Selection.InsertAfter “.” Case 2 ‘, If iPara (ilastPara) Then Selection.InsertAfter “,” If iPara = (ilastPara – 1) Then Selection.InsertAfter ” and” If iPara = (ilastPara) Then Selection.InsertAfter “.” Case 3 ‘. Selection.InsertAfter “.” Case 4 ‘ on last line only If iPara = (ilastPara) Then Selection.InsertAfter “.” End Select If iPara = ilastPara Then ‘Position cursor at end ActiveDocument.Paragraphs(ilastPara).Range.Characters.Last.Previous.Select Selection.Collapse Direction:=wdCollapseEnd End If End Sub
===============================
Format each cell in a range
==============================For Each cCell In rSelect.Cells
While wrkCellRemoveTrailingBlankLines(cCell) ‘ clean up cell
Wend
‘Skip cells in Row 1 ‘
If cCell.ColumnIndex >= iColStart And cCell.ColumnIndex 1 Then
For Each pPara In cCell.Range.Paragraphs
iCnt = iCnt + 1
StatusBar = “Smart Format ” & iCntiChar = pPara.Range.Characters.Count – 1 ‘dont process end of para character
If iChar > 0 Then
While pPara.Range.Characters(iChar).Text = ” ”
pPara.Range.Characters(iChar).Select
Selection.Delete ‘ but does not seem to delete the last space in a para
iChar = iChar – 1 ‘ Handle blanks at end and table cChars
Wend
End If
If iChar >= 1 Then ‘ check if not a blank line
pPara.Range.Characters(iChar).Select
bAddPeriod = True
If bAddPeriod And InStr(“.:;?!,”, Selection.Text) > 0 Then bAddPeriod = False
If bAddPeriod And Selection.Range.Bold 0 Then bAddPeriod = False
If bAddPeriod Then
Selection.MoveStart Unit:=wdCharacter, Count:=-2
If Selection.Text = ” or” Then bAddPeriod = False
End If
If bAddPeriod Then
Selection.MoveStart Unit:=wdCharacter, Count:=-1
If Selection.Text = ” and” Then bAddPeriod = False
End If
If bAddPeriod Then Selection.InsertAfter “.”
‘ handle and/or
End If ‘ test for not a blank line
Next pPara
End If ‘test for skip cols/rows
Next cCell
rSelect.Select[/SIZE][/CODE] -
Charles Kenyon
AskWoody LoungerMarch 23, 2016 at 6:12 am #1557017***
Ah! Reveal Codes! I’ve been looking for Reveal Codes for years in Word, and all this time it was right in front of me.
For more, see Shift+F1 Reveal Formatting.
-
MrJimPhelps
AskWoody MVPMarch 23, 2016 at 7:13 am #1557023For more, see Shift+F1 Reveal Formatting.
Very useful stuff, Charles!
Group "L" (Linux Mint)
with Windows 10 running in a remote session on my file server -
Charles Kenyon
AskWoody LoungerMarch 24, 2016 at 3:08 pm #1557232For more, see Shift+F1 Reveal Formatting.
Very useful stuff, Charles!
Thank you.
-
-
-
-
-
macropod
AskWoody_MVP -
WSLady-Laughsalot
AskWoody LoungerMarch 23, 2016 at 4:28 am #1557013Thank you Macropod, this is probably what I need as I can add this wildcard search to my highlight macro. I have set my highlight macro to show any punctuation missing in pink, digits in yellow and everything else in green (please see the attached document).
I am trying to insert at the beginning of the macro to first delete white space after paragraphs so that the macro does not highlight any punctuation already present.
Is there also a way to tell the macro to only highlight if there is one space after a fullstop/question mark and ignore if there are already two spaces.
The reason for this macro is to perform quality control checks only and not to find and replace anything, only to highlight the mistakes in the documents so I can visually see what is wrong and make a report.
Code:Sub DPU_QAHighlightPunctuation() Application.ScreenUpdating = False Dim strFnd As String, i As Long With ActiveDocument.Range.Find .ClearFormatting .Replacement.ClearFormatting .Forward = True .Wrap = wdFindContinue .MatchCase = False .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Replacement.Text = “^&” .Replacement.Highlight = True Options.DefaultHighlightColorIndex = wdYellow .MatchWildcards = True .Text = “[0-9[]^0145^0146^0147^0148]{1,}” .Replacement.Text = “^&” .Execute Replace:=wdReplaceAll .Execute Replace:=wdReplaceAll .Text = “[ ]([,:;.)])” .Execute Replace:=wdReplaceAll Options.DefaultHighlightColorIndex = wdGreen .Text = “([.?])[ ]” .Execute Replace:=wdReplaceAll Options.DefaultHighlightColorIndex = wdPink .Text = “([!^13.:;?!]^13)” .Execute Replace:=wdReplaceAll End With ActiveWindow.View.ShowFieldCodes = True With Selection.Find .ClearFormatting .Replacement.ClearFormatting .Replacement.Highlight = False .Text = “^d” .Replacement.Text = “” .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Execute Replace:=wdReplaceAll End With ActiveWindow.View.ShowFieldCodes = False Application.ScreenUpdating = True End Sub
-
macropod
AskWoody_MVPMarch 24, 2016 at 8:10 pm #1557288I am trying to insert at the beginning of the macro to first delete white space after paragraphs so that the macro does not highlight any punctuation already present.
Is there also a way to tell the macro to only highlight if there is one space after a fullstop/question mark and ignore if there are already two spaces.
Try:
Code:Sub DPU_QAHighlightPunctuation() Application.ScreenUpdating = False With ActiveDocument.Range.Find .ClearFormatting .Replacement.ClearFormatting .Forward = True .Format = False .Execute .Wrap = wdFindContinue .MatchWildcards = False .Replacement.Highlight = False 'Delete fields ActiveWindow.View.ShowFieldCodes = True .Text = "^d" .Replacement.Text = "" .Execute Replace:=wdReplaceAll ActiveWindow.View.ShowFieldCodes = False 'Highlight digits, square backets & smart quotes .Text = "^p^w" .Replacement.Text = "^p" .Execute Replace:=wdReplaceAll .MatchWildcards = True .Replacement.Highlight = True Options.DefaultHighlightColorIndex = wdYellow 'Highlight digits, square backets & smart quotes .Text = "[0-9[]^0145^0146^0147^0148]{1,}" .Replacement.Text = "^&" .Execute Replace:=wdReplaceAll 'Highlight spaces followed by punctuation .Text = "[^s ]([,:;.)])" .Execute Replace:=wdReplaceAll Options.DefaultHighlightColorIndex = wdGreen 'Highlight punctuation not followed by two ordinary spaces .Text = "([.?])[^s ][! ]" .Execute Replace:=wdReplaceAll Options.DefaultHighlightColorIndex = wdPink 'Highlight characters other than paragraph breaks or punctuation followed by a paragraph break .Text = "([!^13.:;?!]^13)" .Execute Replace:=wdReplaceAll End With Application.ScreenUpdating = True End Sub
PS: You really should comment your code, so you’ll know what each part does later on.
Note: I deleted your final Find/Replace as it doesn’t actually do anything.Cheers,
Paul Edstein
[Fmr MS MVP - Word] -
WSLady-Laughsalot
AskWoody LoungerJuly 27, 2016 at 5:43 am #1571918Hi all, I would like to update my missing punctuation macro further with the following:
1. ignore paragraphs/headings in bold text;
2. ignore instances of paragraphs that end with semi-colons and the words ‘or’ and ‘and’ e.g. ‘; or’ or ‘; and’Is this at all possible to include in the coding below please. Many thanks
Code:‘is there any punctuation missing’ Options.DefaultHighlightColorIndex = wdPink .Text = “([!^13.:;?!]^13)” .Execute Replace:=wdReplaceAll
-
-
-
WSLady-Laughsalot
AskWoody LoungerJuly 28, 2016 at 6:41 am #1572083
-
-
Charles Kenyon
AskWoody Lounger -
WSLady-Laughsalot
AskWoody LoungerJuly 27, 2016 at 7:39 am #1571923Hi Charles, thanks for the reply but I have absolutely no idea what that means unfortunately – I am not a coder I simply quality control documents for house style and have put together a highlight macro which quickly shows me what is wrong with the document in a variety of colours – the particular bit I’m looking to update is highlighting where missing punctuation is in pink but I want it to ignore any text in bold which are usually clause headings and also when paragraphs end with
; or / ; and – thanks Shelley -
richardbarrett
AskWoody Lounger
-
-
Charles Kenyon
AskWoody LoungerJuly 27, 2016 at 8:04 am #1571927See Grammarly for Office. I am confident it will find most punctuation anomalies.
-
WSLady-Laughsalot
AskWoody LoungerJuly 27, 2016 at 8:49 am #1571935See Grammarly for Office. I am confident it will find most punctuation anomalies.
Hi Charles
Thanks for this, unfortunately my company have put administration restrictions on anything being downloaded so I am unable to use this. Thanks anyway – Shelley
-
-
Charles Kenyon
AskWoody Lounger
Viewing 4 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Digital TV Antenna Recommendation
by
Win7and10
1 hour, 14 minutes ago -
Server 2019 Domain Controllers broken by updates
by
MP Support
6 hours, 8 minutes ago -
Google won’t remove 3rd party cookies in Chrome as promised
by
Alex5723
7 hours, 47 minutes ago -
Microsoft Manager Says macOS Is Better Than Windows 11
by
Alex5723
11 hours ago -
Outlook (NEW) Getting really Pushy
by
RetiredGeek
17 minutes ago -
Steps to take before updating to 24H2
by
Susan Bradley
1 hour, 50 minutes ago -
Which Web browser is the most secure for 2025?
by
B. Livingston
2 hours, 54 minutes ago -
Replacing Skype
by
Peter Deegan
1 hour, 21 minutes ago -
FileOptimizer — Over 90 tools working together to squish your files
by
Deanna McElveen
4 hours, 51 minutes ago -
Excel Macro — ask for filename to be saved
by
nhsj
13 hours, 18 minutes ago -
Trying to backup Win 10 computer to iCloud
by
SheltieMom
5 hours, 46 minutes ago -
Windows 11 Insider Preview build 26200.5570 released to DEV
by
joep517
2 days, 10 hours ago -
Windows 11 Insider Preview build 26120.3941 (24H2) released to BETA
by
joep517
2 days, 12 hours ago -
Windows 11 Insider Preview Build 22635.5305 (23H2) released to BETA
by
joep517
2 days, 12 hours ago -
No April cumulative update for Win 11 23H2?
by
Peobody
1 day ago -
AugLoop.All (TEST Augmentation Loop MSIT)
by
LarryK
2 days, 13 hours ago -
Boot Sequence for Dell Optiplex 7070 Tower
by
Serge Carniol
3 days, 4 hours ago -
OTT Upgrade Windows 11 to 24H2 on Unsupported Hardware
by
bbearren
3 days, 7 hours ago -
Inetpub can be tricked
by
Susan Bradley
1 day, 15 hours ago -
How merge Outlook 2016 .pst file w/into newly created Outlook 2024 install .pst?
by
Tex265
2 days, 1 hour ago -
FBI 2024 Internet Crime Report
by
Alex5723
3 days, 11 hours ago -
Perplexity CEO says its browser will track everything users do online
by
Alex5723
20 hours, 46 minutes ago -
Login issues with Windows Hello
by
CWBillow
3 days, 22 hours ago -
How to get into a manual setup screen in 2024 Outlook classic?
by
Tex265
3 days, 10 hours ago -
Linux : ARMO rootkit “Curing”
by
Alex5723
4 days, 10 hours ago -
Employee monitoring app leaks 21 million screenshots in real time
by
Alex5723
4 days, 10 hours ago -
Google AI is now hallucinating idioms
by
Alex5723
4 days, 10 hours ago -
april update
by
69800
2 days, 15 hours ago -
Windows 11 Insider Preview build 27842 released to Canary
by
joep517
4 days, 11 hours ago -
Quick Fix for Slowing File Explorer
by
Drcard:))
4 days, 12 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.