I'm having trouble reading text from a word document bookmark
Basically my code is
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Set wrdApp = CreateObject("Word.Application")
Set wrdDoc = wrdApp.Documents.Open(filepath)
wrdDoc.Bookmarks("Bookmark1").Range = "New York"
Debug.Print (wrdDoc.Bookmarks("Bookmark1").Range.Text)
The code properly inserts "New York" at the bookmark. However, the debug statement is always blank. For some reason, it's not reading the text. Any ideas?
Thanks
Basically my code is
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Set wrdApp = CreateObject("Word.Application")
Set wrdDoc = wrdApp.Documents.Open(filepath)
wrdDoc.Bookmarks("Bookmark1").Range = "New York"
Debug.Print (wrdDoc.Bookmarks("Bookmark1").Range.Text)
The code properly inserts "New York" at the bookmark. However, the debug statement is always blank. For some reason, it's not reading the text. Any ideas?
Thanks