L
lots of questions
When creating word templates in 2003, I often record a macro that jumps to
the bottom of the last page, inserts a section break, new page and proceeds
with the routine.
This is what I am currently using to accomplish the goal..
Sub AddPage()
'
' NewPage2 Macro
' Macro recorded 10/17/00 by ic06504
'
Application.ScreenUpdating = False
ActiveDocument.Tables(1).Select
Selection.Copy
Selection.EndKey Unit:=wdStory
Selection.InsertBreak Type:=wdPageBreak
Selection.Paste
Selection.EndKey Unit:=wdStory
Selection.Tables(1).Select
Selection.Cells.Merge
Selection.Cells.SetHeight RowHeight:=426, HeightRule:=wdRowHeightExactly
Selection.Tables(1).Select
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.Collapse
Application.ScreenUpdating = True
End Sub
Am assuming that the "wdStory" is taking me to the bottom of the last page
in the document. How can I write the code to go to the bottom of any page
and do the same thing. There are forms that I need to insert pages between
existing pages. I've looked and can't find exactly what I am looking
for.....any assistance is always appreciated
the bottom of the last page, inserts a section break, new page and proceeds
with the routine.
This is what I am currently using to accomplish the goal..
Sub AddPage()
'
' NewPage2 Macro
' Macro recorded 10/17/00 by ic06504
'
Application.ScreenUpdating = False
ActiveDocument.Tables(1).Select
Selection.Copy
Selection.EndKey Unit:=wdStory
Selection.InsertBreak Type:=wdPageBreak
Selection.Paste
Selection.EndKey Unit:=wdStory
Selection.Tables(1).Select
Selection.Cells.Merge
Selection.Cells.SetHeight RowHeight:=426, HeightRule:=wdRowHeightExactly
Selection.Tables(1).Select
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.Collapse
Application.ScreenUpdating = True
End Sub
Am assuming that the "wdStory" is taking me to the bottom of the last page
in the document. How can I write the code to go to the bottom of any page
and do the same thing. There are forms that I need to insert pages between
existing pages. I've looked and can't find exactly what I am looking
for.....any assistance is always appreciated