Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Searching a Word document
Message
From
01/02/2004 15:00:47
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Searching a Word document
Miscellaneous
Thread ID:
00872799
Message ID:
00872799
Views:
46
i'm using automation to manipulate a word document and am having trouble searching a document that contains textboxes.

i use this code in my search:
------------------------------------------
oWord = CreateObject( "Word.Application" )
oWord.Documents.Open("g:\filename.doc")
oRange = oWord.ActiveDocument.Range(0,0)
WITH oRange.Find
.Text = "AGE1"
.matchcase = .f.
.format = .f.
lfound = .Execute()
ENDWITH
RELEASE oRange
oWord.Quit
RELEASE oWord
------------------------------------------

if the text 'AGE1' is in a textbox then this doesn't work, if i search for a textstring in the 'normal' text then it works.

q. how to find the 'textbox text'?

many thanks in advance!
Next
Reply
Map
View

Click here to load this message in the networking platform