'* +++++++++++++++++++++++++++++
'* Created By I Love You_Word!@ExcelHome 2005-8-14 5:57:20
'仅测试于System: Windows NT Word: 10.0 Language: 2052
'^The Code CopyIn [ThisDocument-ThisDocument]^'
'* ----------------------------- Sub SetWordFont()
Dim i As Paragraph, MyWordRange As Range, ParCount As Integer
On Error Resume Next
Application.ScreenUpdating = False
With ThisDocument
For Each i In .Paragraphs
ParCount = ParCount + 1
If ParCount Mod 2 = 0 Then
Set MyWordRange = .Range(i.Range.Start, i.Range.Words(2).End)
MyWordRange.Font.Color = wdColorBlue
Else
i.Range.Words(1).Font.Color = wdColorRed
End If
Next
End With
Application.ScreenUpdating = True
End Sub
'---------------------- 我这个只是一个示例,如果结合楼主的附件,则要考去除空白段落,从LINKS段落向下计数循环,设置颜色。 主要代码已经有了,我想,其它部分,对于楼主而言,应该没有困难了。 |