Problem with Find and Tables
- From: Erik Gollot <Erik Gollot@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 8 Dec 2008 01:02:01 -0800
I've made a script that search all words of a specified style.
This macro works fine but enter in an infinite loop when it find a text
with the specified style into a table
Any idea ?
Here is the script :
Set WSHShell = WScript.CreateObject("WScript.Shell")
Set appWord = Wscript.CreateObject("Word.Application")
appWord.Documents.Open("C:\users\erik\bnpp\search.doc")
appWord.Visible = False
appWord.Selection.Find.ClearFormatting
With appWord.Selection.Find
.Text= ""
.Style = appWord.ActiveDocument.Styles("Exigence")
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
Do While appWord.Selection.Find.Execute = True
MsgBox appWord.Selection
Loop
End With
appWord.Quit
Set appWord = Nothing
.
- Follow-Ups:
- Re: Problem with Find and Tables
- From: Helmut Weber
- Re: Problem with Find and Tables
- Prev by Date: Re: Ribbon tab select in Word 2007 VBA
- Next by Date: Protected Form Spell Checking & Wavy Lines
- Previous by thread: Ribbon tab select in Word 2007 VBA
- Next by thread: Re: Problem with Find and Tables
- Index(es):
Relevant Pages
|