lpking2005
Board Regular
- Joined
- Mar 21, 2011
- Messages
- 140
hi, i currently have this code attached to a button on a userform
This button will open a powerpoint presentation, print it then should close powerpoint.
But all it does is print, closes the active presentation and leaves powerpoint open.
Application.Quit does not seem to be working.
Private Sub CommandButton1_Click()
'
'Open and print Silicone Test Sheets (powerpoint)
'
Dim ppt As Object
Set ppt = CreateObject("PowerPoint.Application")
With ppt
.Visible = True
.Presentations.Open "T:\Production\PROD MOULDING\Digital Line Manuals\General\Forms\Silicon Test Sheets.ppt"
.ActivePresentation.PrintOut
.ActivePresentation.Close
.Application.Quit
End With
Unload Me
End Sub
This button will open a powerpoint presentation, print it then should close powerpoint.
But all it does is print, closes the active presentation and leaves powerpoint open.
Application.Quit does not seem to be working.
Private Sub CommandButton1_Click()
'
'Open and print Silicone Test Sheets (powerpoint)
'
Dim ppt As Object
Set ppt = CreateObject("PowerPoint.Application")
With ppt
.Visible = True
.Presentations.Open "T:\Production\PROD MOULDING\Digital Line Manuals\General\Forms\Silicon Test Sheets.ppt"
.ActivePresentation.PrintOut
.ActivePresentation.Close
.Application.Quit
End With
Unload Me
End Sub