Sub ChangeBookmark()
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Open("c:\doc1.docx")
Set objRange = objDoc.Bookmarks("b1").Range
objRange.Text = "new value1"
Set objRange = objDoc.Bookmarks("b2").Range
objRange.Text = "new value2"
objDoc.Save
objDoc.Close
objWord.Quit
End Sub
0 نظر
تازه ترین ها