Using Word Bookmarks to read Text
If you don't have a reference set to word, the the constants wdLine and
wdExtend are viewed as uninitialized variables with a value of zero (which
probably isn't the value intended). Either create a reference to the word
object model or hard code the probably numeric value of the constants.
--
Regards,
Tom Ogilvy
"Charles" wrote in message
...
Hi I need to collect text from a word Document and put it
in a msgbox.
I am using this code but it wont work can someone help?.
with wdApp
wdDoc.bookmarks("ProbTitle").Select
.Selection.EndKey Unit:=wdLine, Extend:=wdExtend
msgbox .Selection.Text
end with
TIA
Charles
|