Quote:
Originally Posted by macropod
I see no indication from your attachment that you've made any attempt to implement the solution in the link I provided. Doing so would be a trivial undertaking - all you need do is put the table into the page header, split the table so the number to be updated is in a cell of it's own, then put the field code in that cell.
|
Within the VBA script, is this correct for wanting sheets numbered 3000-3099?
Quote:
Option Explicit
Private Sub Document_New()
Call Document_Open
End Sub
Private Sub Document_Open()
Dim iStart As Long, iEnd As Long, iCount As Long
On Error GoTo Done
iStart = InputBox(3000, 3000)
iEnd = InputBox(3099, 3099, iStart)
If IsNumeric(iStart) = False Or IsNumeric(iEnd) = False Then GoTo Done
If iStart > iEnd Or iEnd = 0 Then GoTo Done
iCount = iEnd - iStart
With ActiveDocument
Application.ScreenUpdating = False
.Sections.First.Headers(wdHeaderFooterPrimary).Pag eNumbers.StartingNumber = iStart
.Range.Delete
For iCount = iStart To iEnd - 1
.Range.InsertAfter Text:=Chr(12)
Next iCount
Application.ScreenUpdating = True
End With
Done:
End Sub
|