This is an example ready against moving page tags, it still restore page
name, if changed.
'on ThisDocument
Private Sub Document_DocumentChanged(ByVal doc As IVDocument)
Dim strPages As String
Dim pge As Visio.Page
For Each pge In ActiveDocument.Pages
strPages = strPages & " " & pge.Name
Next
DoUndo
End Sub
' on Standard Module
Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal
hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long)
As Long
Sub DoUndo()
hwnd = Visio.Application.WindowHandle32
Call PostMessage(hwnd, &H111, &H3F9, hwnd)
End Sub
Sub DoRedo()
hwnd = Visio.Application.WindowHandle32
Call PostMessage(hwnd, &H111, &H3FA, hwnd)
End Sub