>|vb|
Sub Macro()
Dim wdObj As New Word.Application
Dim wdDoc As Word.Document
Dim filepath As String
Dim i As Long
'ワードファイルのパスを指定
filepath = "C:\Documents and Settings\hogehoge\デスクトップ\test.doc"
With wdObj
.Visible = True
.Documents.Open filepath
Set wdDoc = .ActiveDocument
i = 1
While Worksheets("Sheet1").Cells(i, 1).Value <> ""
With .Selection
.Find.Text = Worksheets("Sheet1").Cells(i, 1).Value
.Find.Forward = True
'色を指定
.Find.Replacement.Font.ColorIndex = wdRed
.Find.Execute , , , , , , , , , , wdReplaceAll
End With
i = i + 1
Wend
End With
wdDoc.Close SaveChanges:=True
wdObj.Quit
Set wdObj = Nothing
Set wdDoc = Nothing
End Sub
||<
ありがとうございます。これを元に作ってみます。