I'm looking for a way to find out the text content between two bookmarks placed on the MSWord page header.
Suppose two bookmarks are BKM_1 and BKM_2. also the text between two booksmarks is "Test".
Local loWordApplication, loDoc, loRange
loWordApplication = CREATEOBJECT("Word.Application")
loDoc = loWordApplication.Documents.Open("C:\Example.doc")
IF loDoc.BookMarks.EXISTS("BKM_1") AND loDoc.BookMarks.EXISTS("BKM_2")
loRange = loDoc.RANGE(loDoc.BookMarks("BKM_1").START, loDoc.BookMarks("BKM_2").START)
loRange.SELECT
?loRange.TEXT && Printing the value here and expecting the result as "Test"
ENDIF
But eventhgough the bookmarks exist, above doesn't produce the result that I'm looking for. Please help!