With the last update I had some code that doesn’t work any more on a Mac using Word 2016 with the newest OS:
This is the bit:
Rem *** Remove common direct character level formatting to prevent passthrough ***
Private Sub ResetTextToBase()
Dim MyStyle As Style
Dim MyParagraph As Paragraph
Home
For Each MyParagraph In ActiveDocument.Paragraphs
BText “Cleaning up direct formatting in text”
MyParagraph.Range.Select
If Not Selection.Information(wdWithInTable) Then
Set MyStyle = Selection.Style
With Selection
.Font.Name = MyStyle.Font.Name
.Font.Size = MyStyle.Font.Size
End With
End If
Next MyParagraph
Set MyStyle = Nothing
Set MyParagraph = Nothing
End Sub
What it does is to take paragraphs that have been passed between several authors and remove all of the garbage that each one introduces while preserving italics and caps and small caps. The error occurs on the line (run-time error 91):
.Font.Name = MyStyle.Font.Name
I’ve know this bit of code needed some updating for a while because it’s a pretty old routine. I appreciate any help you can give me.
Thanks!