Hi Kalyan,
yes and no, it all depends.
Sorry, these are too many questions for me right now.
So a bit of theory might help you more than just some code lines.
Whith the code I posted you get a page,
in a very simplified way.
Word doesn't really know much about pages.
Pages are recalculated on the fly,
depending on the printer and other variables.
If you do something to a page,
like deleting the last word,
the first Word from the next page
might move to the actual page.
Ok, if it has to be,
this replaces all text in brackets
on page 25, as it was when the macro started,
with some other text.
But note, that text in brackets may move from the
next page to the actual page and
complicate things a lot.
Split it all up in seperate questions and ask again.
Some other people might know as well,
and some might even know better.
Sub Test67()
Dim lPages As Long
Dim rTmp As Range
lPages = ActiveDocument.ComputeStatistics(wdStatisticPages)
ActiveDocument.Range(0, 0).Select
Selection.ExtendMode = False
Selection.GoTo _
what:=wdGoToPage, _
which:=wdGoToAbsolute, _
Count:=25
Set rTmp = Selection.Bookmarks("\page").Range
With rTmp.Find
.Text = "\[*\]" ' any text between brackets
.Replacement.Text = "[this was deleted]"
.Wrap = wdFindStop
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
Selection.Collapse
End Sub
--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Vista Small Business, Office XP