Sample scripts


Microsoft Office
   Microsoft Word
       Modify Bookmark Text in a Word Document

' Modify Bookmark Text in a Word Document


Set objWord = CreateObject("Word.Application")
objWord.Caption = "Test Caption"
objWord.Visible = True

Set objDoc = objWord.Documents.Open("c:\scripts\word\bookmarkdoc.doc")

Set objRange = objDoc.Bookmarks("NameBookmark").Range
objRange.Text = "Bob"

Set objRange = objDoc.Bookmarks("AddressBookmark").Range
objRange.Text = "999"


VbsEdit includes all these samples!




This package includes VbsEdit 32-bit, VbsEdit 64-bit, HtaEdit 32-bit and HtaEdit 64-bit.
The evaluation version never expires.




Home  

Copyright © 2001-2016 Adersoft