Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
SP SP is offline
external usenet poster
 
Posts: 12
Default print button for specific pages

I have searched and haven't found an answer for this:

I have a Word document, with the first page being an index, being followed
by 20 checklists (ususally one or two pages long). Instead of creating 20
files and password protecting each, we placed them all in one document, with
the index having hyperlinks to each checklist (by bookmark). What I would
like to do is add a command button to each checklist's header so that when
the user clicks to access a specific checklist, they can press the command
button to print only that specific checklist. I know you can go to
file/print/and select which pages you want to print, but it would be easier
and quicker for us to have a simple button to do this. Besides, we get some
users that click the toolbar print button and end up printing all 20
checklists.
--
Sue
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Bear[_2_] Bear[_2_] is offline
external usenet poster
 
Posts: 314
Default print button for specific pages

Sue:

I have two suggestions, both require a little knowledge of macros.

1. Record a macro of printing the current page. Save it in the template used
for the document. You can edit out most of the parameters and use just:

Sub x()
'
' x Macro
' Macro recorded 5/1/2007 by David Chinell
'
Application.PrintOut _
Range:=wdPrintCurrentPage, _
Item:=wdPrintDocumentContent, _
Copies:=1

End Sub

Attach this to a custom button (storing the customization in the template,
not the document). Alternately, create a MacroButton field that calls the
macro.

2. Rather than use the current page, set each form as a separate section,
and print that section. I think the section number may act more predictibly,
and will allow multiple-page forms. Your code would look like:

Sub x()
'
' x Macro
' Macro recorded 5/1/2007 by David Chinell
'

Dim strSection As String

strSection = Format(Selection.Information(wdActiveEndSectionNum ber))
strSection = "s" & strSection

Application.PrintOut _
Range:=wdPrintRangeOfPages, _
Pages:=strSection, _
Item:=wdPrintDocumentContent, _
Copies:=1

End Sub

Bear
--
Windows XP, Word 2000


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
SP SP is offline
external usenet poster
 
Posts: 12
Default print button for specific pages

Thank you so much. Between your information and information I found on how
to print the checklist without the button showing on the printed form, I was
able to code this perfectly!

Thanks again!!!!!!!!!!!
Sue


"Bear" wrote:

Sue:

I have two suggestions, both require a little knowledge of macros.

1. Record a macro of printing the current page. Save it in the template used
for the document. You can edit out most of the parameters and use just:

Sub x()
'
' x Macro
' Macro recorded 5/1/2007 by David Chinell
'
Application.PrintOut _
Range:=wdPrintCurrentPage, _
Item:=wdPrintDocumentContent, _
Copies:=1

End Sub

Attach this to a custom button (storing the customization in the template,
not the document). Alternately, create a MacroButton field that calls the
macro.

2. Rather than use the current page, set each form as a separate section,
and print that section. I think the section number may act more predictibly,
and will allow multiple-page forms. Your code would look like:

Sub x()
'
' x Macro
' Macro recorded 5/1/2007 by David Chinell
'

Dim strSection As String

strSection = Format(Selection.Information(wdActiveEndSectionNum ber))
strSection = "s" & strSection

Application.PrintOut _
Range:=wdPrintRangeOfPages, _
Pages:=strSection, _
Item:=wdPrintDocumentContent, _
Copies:=1

End Sub

Bear
--
Windows XP, Word 2000


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Bear[_2_] Bear[_2_] is offline
external usenet poster
 
Posts: 314
Default print button for specific pages

Sue:

You're welcome. I'd love to hear how you arranged for the button not to
print on the form....

Bear

--
Windows XP, Word 2000

  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default print button for specific pages

See http://word.mvps.org/faqs/tblsfldsfm...rintButton.htm

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Bear" (nospam) wrote in message
...
Sue:

You're welcome. I'd love to hear how you arranged for the button not to
print on the form....

Bear

--
Windows XP, Word 2000


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 specific pages of a specific section Rob E Microsoft Word Help 4 October 22nd 09 12:15 PM
Print Specific Pages Jules Microsoft Word Help 2 February 26th 07 03:32 AM
how can i print all the pages of a document that have a specific w tvscrtiptgirl Microsoft Word Help 4 May 10th 06 11:48 PM
How do I print all pages containing a specific word? t.cecil Microsoft Word Help 0 June 15th 05 03:40 PM
How can I print a watermark on specific pages in a big document? jj Microsoft Word Help 1 February 2nd 05 05:52 PM


All times are GMT +1. The time now is 03:53 PM.

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"