PDA

View Full Version : Screen capture (print screen) to new Excel workbook or Word



BACI
01-15-2014, 04:50 PM
Hi All,

How are you doing. I have question related to one of a solution placed by Zack Barresse, on November 14th, 2009, related to Screen capture (print screen) to new workbook.

As I am new and still learning on VBA code and its function so request your assistance and kind guidance.

Currently I am working on a project where I need a button which will capture the screen-shots of the and save it to a file placed on desktop. In a day I have to capture more than 5000 screen-shot and all are to placed in a same sheet on desktop.

Currently the code which is created by you does the same work of screen capture but I need to save that screen-shot on a file on desktop.



Please assist.

Thank You a lot :)

Regards,
BACI

Aussiebear
01-15-2014, 07:41 PM
Is this the code that you referring to?

http://www.vbaexpress.com/kb/getarticle.php?kb_id=1075 (http://www.vbaexpress.com/kb/getarticle.php?kb_id=1075)

BACI
01-15-2014, 10:52 PM
Hi Aussiebear,

Thank you for your response. Thats correct the same code I'm refer too. I was trying to paste thw link but was unable to do so.

Sorry for that.

Please assist.

Thank you.
God bless you

Regards

westconn1
01-16-2014, 04:49 AM
some time ago i wrote an activex dll that can be used in vba or vbs, to duplicate the clipboard object of vb6
you would be able to use that to save the clipboard contents to a files

if interested http://www.vbforums.com/showthread.php?t=585616

BACI
01-16-2014, 01:53 PM
Hi Westconn1,

Thank you for your reply. As I am new to the VB code I am trying to co-relate to the work I am trying to do.

Thank You for your assistance

Regards

Kenneth Hobs
01-16-2014, 08:31 PM
I am confused. Capture screen shots of the what? Place 5,000 screen shots in the same sheet? What do you mean, place the images into a worksheet in an Excel file located on your Desktop?

I fear that with that many images, the file size would be huge.

Using the code from the link in post #4, in the Access forums link, http://www.access-programmers.co.uk/forums/showthread.php?t=245198, you just need to add a bit more to test it. Be sure to set the reference to the OLE Automation object as explained. The 3 second delay is a bit long. It should be less I suspect.

Sub Test_SaveClip2Bit() Dim s As String
s = "c:\temp\test.bmp"
SaveClip2Bit s
End Sub

BACI
01-17-2014, 02:39 PM
Hi Kenneth Hobs,

Thank you for your reply. I have to take the screen shot of the active wndow display on desktop. I am trying to create a depository of all the work we do via screen shots in excel or word.

Kenneth Hobs
01-17-2014, 02:47 PM
Might it not be better to just put them all into OneNote? OneNote makes that very easy.

For Vista+, you might look into the snipping tool. http://windows.microsoft.com/en-us/windows/use-snipping-tool-capture-screen-shots#1TC=windows-vista

Zack Barresse
01-18-2014, 12:25 PM
5000 captures? Isn't that like one every 10 seconds? We'd need to know the scope of what you're trying to do. You can certainly get a screen capture and save it, but that won't provide us with the logic or infrastructure needed here. Can you give us a little more background information? This sounds like something you're going to ask to run in the background, which sounds very messy and problematic. What would make more sense is to put this action on a button rather than capture automatically. But if done in VBA that limits you to the application(s) you're working with, so background information would help us understand quite a bit.

BACI
01-18-2014, 02:39 PM
Hi all,

Thank you for your kind attention toward my question.

I will try to rephrase my question.

The kind of work I do where I need to take screen shot of some of the application. Can be anything like web based or mainframe or outlook.

Currently we take a screen shot and paste it on a excel file manually its a kind of depository for my department on what information were available during the time of working.

Now I am trying to create a macro button, like when I click on the button it takes the screen shot and paste it to the depository file.

REGARDS
BACI

BACI
01-19-2014, 07:36 PM
Any suggestions :)

Zack Barresse
01-20-2014, 01:27 AM
You describe what you want as a Windows application or service, but you describe what you want as fired from a button, assuming Excel button (being in the Excel help and all). How about you describe, in detail, what you would like to do. If it's take intermittent screen shots of your monitor not fired through Excel (via button, whatever), that's something different entirely. Taking a screen shot is fine and all, but we'd need to know where you want this saved (you say pasted, but saved is the appropriate term), as well as how this should be fired.

Also, you didn't address my initial concern about timing/cadence. 5000 is a LOT of screenshots. So how you want this fired off is an extremely important dictation to make. Doing this too often/quickly could diminish system resources.