Not saying this is the best way, but something like this might do:
Sub Test()
Dim oPar As Paragraph
For Each oPar In ActiveDocument.Paragraphs
If InStr(oPar.Range.Text, "Match this text") = 1 Then
oPar.Style = "Heading 1"
End If
If InStr(oPar.Range.Text, "Match some other text") = 1 Then
oPar.Style = "Heading 2"
End If
Next oPar
End Sub
Replace "Match this text" and "Match some other text" with the certain text
you had in mind.

Signature
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
> I have a document that is about 600 pages long that I need to
> programmatically make headers (Heading 1, Heading 2, Heading 3...) I
[quoted text clipped - 6 lines]
>
> J
ybazizi - 21 Mar 2005 03:31 GMT
Thanks Greg - that was exactly what I needed. I just needed a good example
of the way to use the Range object.
J
> Not saying this is the best way, but something like this might do:
>
[quoted text clipped - 26 lines]
> >
> > J