Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word VBA

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 06-03-2011, 07:09 AM
dfinch dfinch is offline Windows XP Office 2000
Novice
 
Join Date: Jun 2011
Posts: 2
dfinch is on a distinguished road
Question Printing specific section


Hello is there a way for a script to print a specific (ideally the current) section in Word. I am hoping to have a button or link in each section that would allow a user to print just that section instead of the whole documet. Googling this topic has not returned anything concrete so I am wondering if someone can help here. Unfortunatly this has to be in Word 2000. Failing that I am thinking I can print the page ranges, however this is not ideal because of the upkeep when the document is updated. Any help or pointers would be greatfully recieved. Thanks,

Derek
Reply With Quote
  #2  
Old 06-03-2011, 02:38 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2007
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,353
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Hi Derek,

You could do that with a macro like:
Code:
Sub PrintMe()
Dim Rng As Range
Set Rng = Selection.Range
Rng.Sections(1).Range.Select
Application.PrintOut Range:=wdPrintSelection
Rng.Select
End Sub
Note: The above code sends the selected Section direct to the printer without invoking the Print dialogue box.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 06-09-2011, 05:10 AM
dfinch dfinch is offline Windows XP Office 2000
Novice
 
Join Date: Jun 2011
Posts: 2
dfinch is on a distinguished road
Default

Hi macropod, thank you very much for your reply, that is exactly what I was after... its curious that the print option in word has "selection", "all", "current page" and "range" as options but there is no "current section"! I have also added a MsgBox to confirm if the user wishes to print the current section in order to prevent accidental prints!

Thanks again, Derek
Reply With Quote
Reply
Please reply to this thread with any new information or opinions.

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Section Problems phaworth Word 1 04-30-2011 11:23 PM
Different Colors for Each Section? l1willia Word 0 12-30-2010 11:49 AM
Different header for each section? How do I? winwintoo Word 0 04-18-2010 07:59 AM
Section Breaks, maybe? R20 Word 2 12-20-2009 06:35 PM
Section Breaks glenws Word 1 11-05-2009 02:10 PM


All times are GMT -7. The time now is 02:31 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft