Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
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!
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement