Microsoft Office Tutorials and References
In Depth Information
Formatting Spelling Errors for Printing
Wrd
Figure 67 – Formatted Spelling Errors
You can choose to change the font, to underline, and/or to highlight the errors.
In this example, the errors are underlined with bold dots.
The macro saves the original document under a new name because it physically
applies direct formatting to these text ranges. You can specify the type of
formatting desired for the macro to apply.
View the Appendix to learn how to store this procedure
in a Standard module.
Option explicit¶
' * * * * *¶
Const NewNameExtension As String = "_SpellingErrors"¶
Const FormatAsColor As Boolean = False¶
Const FormatAsUnderline As Boolean = True¶
Const FormatAsHighlight As Boolean = False¶
Const WriteToTable As Boolean = True¶
Const sepChar As String = "¦"¶
' * * * * *¶
Sub MarkSpellingErrorsForPrintout()¶
'Variable declaration¶
Dim doc As Word.Document¶
Dim docNewName As String¶
Dim rng As Word.Range¶
Dim pageCounter As Long¶
Dim spErr As Range¶
Dim TableData As String¶
Set doc = ActiveDocument¶
'Save any changes the user has made¶
Search JabSto ::




Custom Search