Ik gebruik de volgende code. Wat ik wil doen is de tag [Plaatje] selecteren in het word template, en vervolgens deze tag wijzigen.
Dim objWord As Word.Application
Set objWord = CreateObject("Word.Application.8")
With objWord
.Visible = True
.Documents.Open (loadvars("installdir") & "\object.doc ")
End With
Set myrange = ActiveDocument.Range
With myrange.Find
.Text = "[plaatje]"
.Execute
If myrange.Find.Found = True Then .Parent.Select
end with
Dim objWord As Word.Application
Set objWord = CreateObject("Word.Application.8")
With objWord
.Visible = True
.Documents.Open (loadvars("installdir") & "\object.doc ")
End With
Set myrange = ActiveDocument.Range
With myrange.Find
.Text = "[plaatje]"
.Execute
If myrange.Find.Found = True Then .Parent.Select
end with