View Single Post
 
Old 07-19-2014, 03:00 AM
macropod's Avatar
macropod macropod is online now Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try:
Code:
Sub Demo()
Dim Rng As Range, i As Long
With ActiveDocument.Range
  Set Rng = .GoTo(What:=wdGoToPage, Name:=1)
  Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\page")
  With Rng
    .Copy
    For i = 1 To 10
      .InsertAfter vbCr & Chr(12)
      .Collapse wdCollapseEnd
      .Paste
    Next
  End With
  Set Rng = .GoTo(What:=wdGoToPage, Name:=5)
  Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\page")
  With Rng.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "Tariq"
    .Replacement.Text = "Johnson"
    .Format = False
    .Forward = True
    .Wrap = wdFindStop
    .MatchCase = True
    .MatchWholeWord = True
    .Execute Replace:=wdReplaceAll
  End With
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote