Hi. I put together a macro that watches the document changes like adding a page. However the macro does not detect a page addition when using the Layout view and CTRL+left click drag. Why is that?
Here is the code located in the 'ThisMacroStorage' section. What am I missing?
Dim WithEvents CurDoc As Document Private Sub GlobalMacroStorage_WindowActivate(ByVal Doc As Document, ByVal Window As Window) Set CurDoc = Doc End Sub Private Sub GlobalMacroStorage_WindowDeactivate(ByVal Doc As Document, ByVal Window As Window) Set CurDoc = Nothing End Sub Private Sub CurDoc_PageCreate(ByVal Page As Page) update End Sub Private Sub CurDoc_PageDelete(ByVal Count As Long) update End Sub
try use CurDoc_PageChange or CurDoc_PageActivate and check CurDoc.Pages.Count
Is this the correct way to write this out?
Private Sub CurDoc_PageChange(ByVal Page As Page)check CurDoc.Pages.Count updateEnd Sub