View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.printing,microsoft.public.excel.programming,microsoft.public.word.vba.beginners
Charles Maxson Charles Maxson is offline
external usenet poster
 
Posts: 24
Default Print Control in Word/Excel

From Excel, create a sheet button and assign it to this macro:
Sub PrintDialog()
Application.Dialogs(xlDialogPrint).Show
End Sub

From Word, use this one:
Sub PrintDialog()

Application.Dialogs(wdDialogFilePrint).Show
End Sub

Or from either application use this routine:
Sub PrintDialog()
If Application.Name = "Microsoft Excel" Then
Application.Dialogs(8).Show
ElseIf Application.Name = "Microsoft Word" Then
Application.Dialogs(88).Show
End If
End Sub


--
Charles
www.officezealot.com


"Ravi" wrote in message
...
Hello

I want to place a 'Button' Control in Excel and Word files.

I want the button to bring up the Print dialogue, just the same way as

going
to FILE -- Print would do

How do I do this?

Thank you