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
Note that the code works backwards through the document, so that its own additions don't disturb the locations of the original page breaks.