Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 9th, 2005, 03:49 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default Capture Screen and Paste to Word Document

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
__________________
Greg Serrano
Michigan Dept. of Environmental Quality
Air Quality Division





Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Screen Capture sujeetji Pro PHP 2 December 1st, 2006 06:47 AM
Screen capture issue RNedel C# 3 September 22nd, 2006 01:51 PM
Copy contents of Word doc & Paste in Excel - How?? robear Javascript How-To 1 August 23rd, 2006 03:22 PM
How to Copy contents of Word doc & Paste in Excel robear Pro PHP 0 August 21st, 2006 12:25 PM
Hide controls/GUI components before screen capture wmoy VB.NET 0 January 10th, 2005 05:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.