But if you want to do it in VBA (with some help from here: http://word.mvps.org/faqs/macrosvba/PrtSc.htm)
Option Explicit
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _
bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const KEYEVENTF_KEYUP = &H2
Private Const VK_SNAPSHOT = &H2C
Private Const VK_MENU = &H12
Sub PrintScreen()
' To capture the whole screen:' keybd_event VK_SNAPSHOT, 1, 0, 0
End Sub
Sub AltPrintScreen()
' To capture the active window'
keybd_event VK_MENU, 0, 0, 0
keybd_event VK_SNAPSHOT, 0, 0, 0
keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0
keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0
End Sub
Sub PrintScrnToJpeg()
Dim sld As Slide
Dim shp As Shape
Call AltPrintScreen 'To print the active window
' Call PrintScreen 'To print the whole screen
ActiveWindow.Selection.Unselect
ActiveWindow.View.Paste
Set sld = ActiveWindow.View.Slide
Set shp = sld.Shapes(sld.Shapes.Count)
shp.Export "C:\Temp\Picture1.jpg", ppShapeFormatJPG
' shp.Delete 'If you want to delete the screen shot from the ppt slideEnd Sub
Hope that helps.
Cheers
Rich