Formatting text in a word document

G

Guy Cohen

Hi all.

Is it possible to :

a. Change text in a table to have a specific font name/color.
b. Change font/color of a docVariable

If yes - please provide some code.

TIA
Guy
 
J

Jean-Guy Marcil

Dim wdApp As Word.Application
Set wdApp = CreateObject("Word.Application")
..
..
..
..
wdApp.Selection.Font.Name = "Arial"
wdApp.Selection.Font.Color = wdColorRed
???


--
Cheers!
_______________________________________
Jean-Guy Marcil - Word MVP
[email protected]
Word MVP site: http://www.word.mvps.org
 
J

Jezebel

You can apply font and color (and all other formatting) instructions to any
range.

ActiveDocument.Tables(1).Cell(1,1).Range.Font.Name = "Arial"

etc.

You can use this same method for any field range. (Assuming that's what you
mean by DocVariables).
 
Top