![]() |
|
#9
|
||||
|
||||
|
The following macro inserts prefixes every page with <pg> and ends it with </pg>
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim i As Long
With ActiveDocument
For i = .ComputeStatistics(wdStatisticPages) To 2 Step -1
.GoTo(What:=wdGoToPage, Name:=i).InsertBefore "</pg><pg>"
Next
.Range.InsertBefore "<pg>"
.Range.InsertAfter "</pg>"
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Configured page size to 20 inches height : why the page still breaks @ the default 9,6” ?
|
Ron Wolpa | Word | 4 | 08-18-2016 06:43 PM |
| Subdocuments without Page Breaks? | titani2 | Word | 8 | 08-26-2014 05:58 AM |
Hidden page breaks and section breaks
|
jrasicmark | Word | 3 | 06-02-2014 11:28 PM |
Page breaks and page numbering
|
sfteam | Word | 3 | 06-06-2013 11:56 PM |
| Deleted Section Breaks Changes Page Breaks | Brantnshellie | Word | 0 | 02-01-2009 09:22 PM |