![]() |
#2
|
||||
|
||||
![]()
Try:
Code:
Sub Demo() Application.ScreenUpdating = False Dim DocSrc As Document, DocTgt As Document, Rng As Range Set DocSrc = ActiveDocument: Set DocTgt = Documents.Add With DocSrc.Range With .Find .ClearFormatting .Replacement.ClearFormatting .Text = "TROUBLE PHONE LINE FAIL" .Replacement.Text = "" .Forward = True .Wrap = wdFindStop .Format = False .MatchCase = False .MatchWildcards = False .Execute End With Do While .Find.Found Set Rng = .Duplicate Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\page") DocTgt.Range.Characters.Last.FormattedText = Rng.FormattedText Rng.Text = vbNullString .Find.Execute Loop End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
LarryHills | Excel | 1 | 02-17-2017 03:55 PM |
![]() |
dwirony | Word VBA | 4 | 10-28-2016 07:51 AM |
Select specific pages to print or save | Jack Byrindi | Word VBA | 0 | 01-16-2014 03:14 PM |
![]() |
greg__reynolds | Word | 1 | 08-30-2012 05:20 AM |
![]() |
vikrantkale | Word | 1 | 03-28-2011 06:13 PM |