View Single Post
  #2   Report Post  
Posted to microsoft.public.word.formatting.longdocs
Greg Maxey
 
Posts: n/a
Default Replacing style of the first word of a paragraph only

Doesn't change the style, but does change the font of the first word.

Sub Test()
Dim oPar
For Each oPar In ActiveDocument.Paragraphs
oPar.Range.Words.First.Font.Name = "Courier New"
Next
End Sub


--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

homeologica wrote:
In a document I must convert only the first word, (entry), of a
paragraph. This first word have a specific font different to rest of
the paragraph.

Can I do this?

Thanks.

Alejandro Fernandez