I would like to be able to connect this action to a button or error handling code: Capture a picture of the active screen, paste it into a Word Document, Save it.
Everything in this code works except the red part. It is being ignored. What I
do get is whatever is in the buffer that was put there using ^C at a previous time. Is there any better way to capture the screen into the clipboard?
Code:
Dim strWordDoc As String
Dim appWordDoc As Word.Application
SendKeys "%{PRTSC}", True
Set appWordDoc = New Word.Application
strWordDoc = "C:\Data\AppTracker\Test.doc"
With appWordDoc
.Visible = True
.Documents.Add , , wdNewBlankDocument
.WindowState = wdWindowStateMaximize
.Selection.Paste
.ActiveDocument.SaveAs strWordDoc
End With
Set appWordDoc = Nothing
I'm working in Access XP. Thanks in advance.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division