![]() |
|
|
|
#1
|
|||
|
|||
|
Hi all, I wrote some very simple VBA code to call up the print dialogue when a command button within the document is clicked. The dialogue code is as below:
Code:
Sub Display_Print_Dialog_CustomAll()
With Dialogs(wdDialogFilePrint)
.Range = wdPrintRangeOfPages
.Pages = "2-8"
If .Show = -1 Then .Execute
End With
End Sub
Code:
Private Sub CommandButton09_Click() Display_Print_Dialog_CustomAll End Sub Hope someone can offer some advice, and thanks in advance, |
|
#2
|
||||
|
||||
|
Hi HorizonSC,
Change: If .Show = -1 Then .Execute to: .Show
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#3
|
|||
|
|||
|
Thanks, it worked! Consider this resolved.
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
embed autocad drawing in word document prints very light
|
gbehm@broan.com | Drawing and Graphics | 1 | 03-15-2011 08:05 PM |
| How can I print out the document as follow? | turbomen | Project | 1 | 05-23-2010 07:24 AM |
| When I print the document changes layout | cooney | Word | 0 | 03-01-2010 12:17 AM |
| print file is 14MB when document is only 850kb | pompeydave | PowerPoint | 0 | 06-01-2009 05:58 PM |
| Print spacing in Word document | veekay99 | Word | 16 | 04-21-2009 01:18 AM |