Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 04-10-2018, 06:39 PM
Guessed's Avatar
Guessed Guessed is offline Auto generate X pages from input Windows 10 Auto generate X pages from input Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I think this should be done with a combination of style and macro.
If you customised a style in your document to provide the 'Unit #' as an autonumber and include the "new page" setting then the macro could be as simple as
Code:
Sub AddPages()
  Dim iNum As Integer
  iNum = Val(InputBox("How many units are you adding?", , 5))
  If iNum > 0 Then
    Selection.Style = "Heading 1"
    Selection.TypeText String(iNum, vbCr)
  End If
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto generate X pages from input Auto-correct on existing text without input m9rbid Word 1 12-18-2017 01:20 PM
How to auto-generate whole Powerpoint presentations from a set of data? olibot2000 PowerPoint 1 06-24-2017 09:01 PM
Automatically generate formulas from just the row numbers (auto insert the column) knewman Excel 14 04-25-2017 11:54 PM
Crash after power failure. Doc is now blank and appears to auto-generate as a new doc on opening Jbobjones Word 0 04-28-2015 09:37 PM
Auto Generate Invoice Number Word 2013 Jonah245 Word VBA 3 09-04-2014 05:24 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:01 PM.


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