Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Word Bookmarks to read Text
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Word Bookmarks to read Text
Try:
msgbox wdDoc.bookmarks("ProbTitle").Range.Text -- "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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cross reference bookmarks in a Microsoft word document | Excel Discussion (Misc queries) | |||
excel to read a row, if word 'x' in then put on other sheet ?? | New Users to Excel | |||
Opening Excel Workbook from Word using VBA - Always Read Only | Excel Programming | |||
Read embedded word document by VBA | Excel Programming | |||
Read embedded word document | Excel Programming |