Microsoft Office Tutorials and References
In Depth Information
Formatting Spelling Errors for Printing
'Add column headings¶
rngTable.Text = "Page" & sepChar & "Error" & _¶
sepChar & "Context" & vbCr & TableData¶
Set tbl = rngTable.ConvertToTable( _¶
Separator:=sepChar, Numcolumns:=3)¶
tbl.Rows(1).Range.Font.Bold = True¶
End If¶
End If¶
End Sub¶
' * * * * *¶
Function GetNewName(doc As Word.Document, _¶
ext As String) As String¶
'Variable declaration¶
Dim s As String¶
Dim loc As Long¶
s = doc.Name¶
'Cut off the file extension¶
loc = InStr(s, ".doc")¶
s = Left(s, loc - 1)¶
GetNewName = s & ext¶
End Function¶
' * * * * *¶
Function TrimEndParas(s As String) As String¶
Do While Asc(Right(s, 1)) = 13¶
s = Left(s, Len(s) - 1)¶
Loop¶
TrimEndParas = s¶
End Function¶
Wrd
Follow these steps:
1. Set the Const values at the beginning for the preferred options to use,
as follows:
NewNameExtension The macro saves the file under a new name so
that the original file remains unchanged. It
keeps the original name, but adds a suffix.
Put what should be added to the original
name in this constant.
¾
FormatAsColor
¾
To have the macro change the text color
where a spelling error is found, set this to
True; otherwise, set it to False.
FormatAsUnderline
¾
To have the macro underline the text where a
spelling error is found, set this to True;
otherwise, set it to False.
Search JabSto ::




Custom Search