Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
danep danep is offline
external usenet poster
 
Posts: 1
Default Printing multiple pages from template

Hi all,

Basically, I have a form that I'm making in Word 2007 that has an
index (i.e. a counter, not the kind of index you find at the back of a
book) that I would like to increment every time it is printed. My
current solution is to use a page number, and create dozens or
hundreds of pages as needed so that each one will have a unique number
on it.

Is there a simpler way to do this? I.e. just have a one page
template, and you can choose to print multiple copies or multiple
pages of that template, and each copy will its own page number?

Sorry if that's confusing; any help is appreciated, my current
solution to this is pretty ugly...

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Printing multiple pages from template

http://www.gmayor.com/automatic_numbering_documents.htm demonstrates how to
produce sequentially numbered documents from an ini file or registry entry.
The macro does work in Word 2007, so all that is required is to change from
an 'invoice number' to a 'print number' eg

Sub AddNoFromINIFileToHeader()
Dim SettingsFile As String
Dim Order As String
Dim sView As String
'Save invoice number in the Word startup folder.
SettingsFile = Options.DefaultFilePath(wdStartupPath) & "\Settings.ini"
'or the Workgroup folder
'SettingsFile = Options.DefaultFilePath(wdWorkgroupTemplatesPath) &
"\Settings.ini"

Order = System.PrivateProfileString(SettingsFile, _
"Print Number", "Order")
If Order = "" Then
Order = 1
Else
Order = Order + 1
End If

System.PrivateProfileString(SettingsFile, "Print Number", _
"Order") = Order
sView = ActiveWindow.View 'store the current view
With ActiveWindow
.View = wdPrintView 'set the document view to print layout
.ActivePane.View.SeekView = wdSeekCurrentPageHeader
With Selection
.WholeStory 'select any existing header text
.Delete Unit:=wdCharacter, Count:=1 'and delete it
.Font.Name = "Arial"
.Font.Bold = True
.Font.Italic = False
.Font.Size = "10"
.ParagraphFormat.Alignment = wdAlignParagraphRight
.TypeText Text:="Print number: " & Format(Order, "#")
End With
.View.SeekView = wdSeekMainDocument
.View = sView
End With
Application.PrintOut FileName:=""
End Sub
http://www.gmayor.com/installing_macro.htm

The above macro will put the text
Print number: n
(where n is the next number) in the top right corner of the header,
formatted as 10 point Arial Bold then prints the document. If saved in your
document template you could intercept the print routine by calling the macro
Sub FilePrintDefault() then when the document is printed the number would be
incremented, but personally I would prefer to add a button to a custom
toolbar in the document template to run the macro as it stands.

You can change the printed text and its position by editing the relevant
parts of the macro, and you can reset the number by editing the ini file in
notepad.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




danep wrote:
Hi all,

Basically, I have a form that I'm making in Word 2007 that has an
index (i.e. a counter, not the kind of index you find at the back of a
book) that I would like to increment every time it is printed. My
current solution is to use a page number, and create dozens or
hundreds of pages as needed so that each one will have a unique number
on it.

Is there a simpler way to do this? I.e. just have a one page
template, and you can choose to print multiple copies or multiple
pages of that template, and each copy will its own page number?

Sorry if that's confusing; any help is appreciated, my current
solution to this is pretty ugly...



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing tables over multiple pages DJnet Tables 1 May 14th 07 07:39 PM
Printing multiple pages per sheet wimma Microsoft Word Help 0 October 16th 06 08:08 PM
Printing multiple pages in Word2003 Paddy Microsoft Word Help 0 October 3rd 06 05:30 PM
Printing multiple pages on one sheet DaveM Page Layout 2 March 6th 06 03:50 PM
Printing multiple copies, multiple pages to a sheet? Heather Microsoft Word Help 1 August 26th 05 08:05 PM


All times are GMT +1. The time now is 06:48 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"