本示例将活动文档中第一段的文字颜色更改为绿色。

ActiveDocument.Paragraphs(1).Range.Font.Color = wpsColorGreen

 

本示例在第一个表格中每个单元格周围添加靛蓝色的点划线边框。

If ActiveDocument.Tables.Count >= 1 Then
    For Each aBorder In ActiveDocument.Tables(1).Borders
        aBorder.Color = wpsColorIndigo
        aBorder.LineStyle = wpsLineStyleDashDot
        aBorder.LineWidth = wpsLineWidth075pt
    Next aBorder
End If