Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 11-04-2013, 09:02 PM
fumei fumei is offline VBA to input / clear text from a Bookmark Windows 7 64bit VBA to input / clear text from a Bookmark Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

And further, rather than all those lines of printing you could use anothwer subroutine:
Code:
Sub DoThePrinting(ThePages as String)
Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages, Item:= _
       wdPrintDocumentWithMarkup, Copies:=1, Pages:=ThePages, PageType:= _
       wdPrintAllPages, Collate:=True, Background:=True, PrintToFile:=False, _
        PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
        PrintZoomPaperHeight:=0
End Sub
Now you can do all your print jobs as:
Code:
'Print Sections
If cbLocations.Value = "True" Then
  Call DoThePrinting("1,2-14")
ElseIf cbPitPipe.Value = "True" Then
  Call DoThePrinting("1,15-31")
 
etc. etc.
BTW: you are for each pint job calling up the display of the dialog. Why? You are sending print job via code, so why have the displayed dialog.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA to input / clear text from a Bookmark Replacing text with user input.?.?.? brad1977 Word 3 11-20-2012 10:20 AM
VBA to input / clear text from a Bookmark Open header to insert text into bookmark Amapola188 Word VBA 3 07-12-2012 05:16 PM
Repeating Bookmark Text BECKTHOMO Word 1 03-27-2012 08:34 PM
VBA to input / clear text from a Bookmark Word 2003 - IncludeText Does Not Include Bookmark Text if in a Form Text Control skarden Word 1 12-12-2011 10:39 PM
VBA to input / clear text from a Bookmark delete all bookmark text hklein Word VBA 4 08-10-2011 04:33 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:53 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