Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-09-2015, 10:18 AM
Jonnyboy Jonnyboy is offline Print dialog box Windows 10 Print dialog box Office 2013
Novice
Print dialog box
 
Join Date: Oct 2015
Posts: 2
Jonnyboy is on a distinguished road
Default Print dialog box

Hi All



I'm currently using a macro to print a document. The macro inserts the required page range (e.g. section numbers). I need to be able to have the print dialog box open so the user can select the appropriate printer (lots of printers available at different locations around the country). Currently the document will print to the users default printer.

Current basic macro is :

Sub PrintMyDoc()

Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentWithMarkup, Copies:=1, Pages:="s1, s2, s3, s4, s4, s5, s6, s7, s5, s6, s8-", PageType _
:=wdPrintAllPages, Collate:=True, Background:=True, PrintToFile:=False, _
PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0

End Sub

Any suggestions on how I can get the dialog box to open and fill the PrintRangeofPages would be much appreciated.

Cheers

John
Reply With Quote
  #2  
Old 10-09-2015, 02:43 PM
gmaxey gmaxey is offline Print dialog box Windows 7 32bit Print dialog box Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
With Application.Dialogs(wdDialogFilePrint)
  .Range = wdPrintRangeOfPages
  .Pages = "s1, s2, s3, s4, s4, s5, s6, s7, s5, s6, s8"
   .Show
End With
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #3  
Old 10-10-2015, 02:28 AM
Jonnyboy Jonnyboy is offline Print dialog box Windows 10 Print dialog box Office 2013
Novice
Print dialog box
 
Join Date: Oct 2015
Posts: 2
Jonnyboy is on a distinguished road
Default Print dialog

Many thanks for that Greg, just the job

John
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Print dialog box Discrepancy between Weeknumber i nOnscreen Gantt Chart and print/print preview deesloop Project 7 07-22-2015 07:52 AM
Why 'print forms data' print pictures for DOCX files koolprasad2003 Word 4 05-09-2014 03:26 PM
Print dialog box Print Layout View Differs from Print Preview & Printed Document terik222 Word 3 03-27-2013 02:43 PM
Suppress Dialog Box crutch024 Word 0 08-17-2010 09:52 AM
Password dialog akwoods Outlook 2 01-09-2006 09:09 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:46 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft