Hi white_flag,
It really does look like you're blundering around in vba without any real idea of what you're doing. For example, I can't see any refernces to the Word application and you've even got lines of code in the wrong order:
You can't write to the 'r' range before you've defined it!!!r.Text = strText Set r = doc.Bookmarks(strBM).Range
Try something along the lines of:
[vba]Sub UpdateBookmark(BmkNm As String, NewTxt As String)
'Note: A reference to the Word object model is required
Dim wdApp As Word.Application
Set wdApp = Word.Application
Dim wdDoc As Word.Document
Dim BmkRng As Word.Range
With wdApp
Set wdDoc = .Documents.Open(ThisWorkbook.Path & "\tabel.doc")
With wdDoc
If .Bookmarks.Exists(BmkNm) Then
Set BmkRng = .Bookmarks(BmkNm).Range
BmkRng.Text = NewTxt
.Bookmarks.Add BmkNm, BmkRng
End If
End With
.Visible = True
End With
Set BmkRng = Nothing: Set wdDoc = Nothing: Set wdApp = Nothing
End Sub[/vba]