Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 02-17-2017, 11:05 AM
webba0264 webba0264 is offline Sequentially number 100 pages of a document Windows 8 Sequentially number 100 pages of a document Office 2007
Novice
Sequentially number 100 pages of a document
 
Join Date: Jun 2016
Posts: 9
webba0264 is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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
Reply With Quote
 

Tags
mailmerge



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to automatically make word document have even number of total pages? lorne17 Word 6 12-16-2014 02:48 PM
Sequentially number 100 pages of a document Advanced page numbering: section pages in header, document pages in footer Albus Word 12 12-12-2014 01:36 PM
Sequentially numbered copies of multi-page word document Mark Paterson Word VBA 3 05-16-2014 04:34 PM
Sequentially number 100 pages of a document Count Number of Pages in Document with Footnotes d4okeefe Word VBA 5 11-11-2013 11:02 AM
Sequentially number 100 pages of a document Sequentially numbering a document UniAdmin Word VBA 1 02-21-2013 07:25 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:05 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft