General information
Category:
COM/DCOM and OLE Automation
Title:
Searching a Word document
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only