Search This Blog

Wednesday, May 4, 2011

 color property:This example changes the color of the text in the first paragraph of the active document to green.

ActiveDocument.Paragraphs(1).Range.Font.Color = wdColorGreen
  
This example changes the color of the selected text to dark red.
Selection.Font.Color = wdColorDarkRed
  
This example adds a dotted indigo border around each cell in the first table.
If ActiveDocument.Tables.Count >= 1 Then
    For Each aBorder In ActiveDocument.Tables(1).Borders
        aBorder.Color = wdColorIndigo
        aBorder.LineStyle = wdLineStyleDashDot
        aBorder.LineWidth = wdLineWidth075pt
    Next aBorder
End If
 

No comments:

Post a Comment