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, 9 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 #1572083Charles 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 LoungerViewing 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
-
Red x next to folder on OneDrive iPadOS
by
dmt_3904
1 hour, 49 minutes ago -
Are manuals extinct?
by
Susan Bradley
3 hours, 43 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
6 hours, 52 minutes ago -
Network Issue
by
Casey H
13 hours, 23 minutes ago -
Fedora Linux is now an official WSL distro
by
Alex5723
18 hours, 51 minutes ago -
May 2025 Office non-Security updates
by
PKCano
19 hours, 18 minutes ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
21 hours, 13 minutes ago -
pages print on restart (Win 11 23H2)
by
cyraxote
20 hours, 29 minutes ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
23 hours, 25 minutes ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
23 hours, 26 minutes ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
1 day, 6 hours ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
19 minutes ago -
Asking Again here (New User and Fast change only backups)
by
thymej
1 day, 18 hours ago -
How much I spent on the Mac mini
by
Will Fastie
17 hours, 33 minutes ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
12 hours, 44 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
2 days ago -
Setting up Windows 11
by
Susan Bradley
19 hours, 4 minutes ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
1 day, 19 hours ago -
Powershell version?
by
CWBillow
1 day, 20 hours ago -
SendTom Toys
by
CWBillow
7 hours, 12 minutes ago -
Add shortcut to taskbar?
by
CWBillow
2 days ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
2 days, 16 hours ago -
How can I install Skype on Windows 7?
by
Help
2 days, 15 hours ago -
Logitech MK850 Keyboard issues
by
Rush2112
1 day, 22 hours ago -
We live in a simulation
by
Alex5723
3 days, 6 hours ago -
Netplwiz not working
by
RetiredGeek
2 days, 17 hours ago -
Windows 11 24H2 is broadly available
by
Alex5723
3 days, 19 hours ago -
Microsoft is killing Authenticator
by
Alex5723
21 hours, 3 minutes ago -
Downloads folder location
by
CWBillow
4 days, 1 hour ago -
Remove a User from Login screen
by
CWBillow
2 days, 21 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.