MACRO for dual screen screen captures pasted into PPT.

J

JBURNS

Hello,
Having problems with a dual screen Macro we set-up in the office to deal
with pasting screen captures into ppt. I capture a screen (Print Screen) and
paste it into a PPT slide and run the MACRO (below). The intent of the MACRO
is to crop and paste Screen 1 on the ppt. slide (removing screen 2).
Unfortunately this will work for the first ‘paste’ but then I get the
following error message when I try it on another slide:

ERROR MESSAGE
Run-time error ‘ -2147188160 (80048240)’:
Selection (unknown member) : Invalid request. Nothing appropriate is
currently selected.
CONTINUE END DEBUG HELP

The Macro I am using is:
Sub DualResize()
'
'Macro recorded 12/28/2007 by Kevin Hill
'
ActiveWindow.LargeScroll ToRight:=1
ActiveWindow.Selection.ShapeRange.PictureFormat.CropRight = 760.03
With ActiveWindow.Selection.ShapeRange
.IncrementLeft 0.75
.IncrementTop 0.25
End With
ActiveWindow.Selection.ShapeRange.ScaleHeight 0.87, msoFalse,
msoScaleFromTopLeft
ActiveWindow.Selection.ShapeRange.ScaleWidth 0.89, msoFalse,
msoScaleFromTopLeft
ActiveWindow.Selection.ShapeRange.ScaleWidth 0.79, msoFalse,
msoScaleFromTopLeft
ActiveWindow.Selection.ShapeRange.ScaleHeight 1.534, msoFalse,
msoScaleFromTopLeft
ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
End Sub


My monitors are set at 1024x768 (SAMSUNG SYNCMASTER 910T).
SOFTWARE is Office 2007, Windows XP.
ALT PRINTSCREEN wont work because I'm capturing multiple windows on Screen
1. I've set my security settings to allow MACROS to run.
Any assistance would be appreciated.
Jon
 
J

JBURNS

Shyam,

Thank you for the feedback, however the paste screen was selected and I've
tested it a few times...still get the same error message:


Thanks,
Jon
 
E

Edward

Why not using windows great feature ALT+printscreen which will only copy
active window ( in this case active screen ) ?
 
J

JBURNS

Edward,

ALT PRINTSCREEN wont fill the requirement because I need to capture multiple
open windows on Screen 1.

Thanks,
Jonathan
 
J

JBURNS

Steve,

Thanks for the program. Inputed the code into a ppt Macro and ran it. It
worked for the first "paste" except for some resizing that needs to be
inputted. When I went to capture the second screen, ensuring the item was
selected, I recieved the exact same error:

Run-time error '-2147188160 (80048240)':
Selection (unknown member) : Invalid request. Nothing appropriate is
currently selected.
CONTINUE END DEBUG HELP


As you can tell, I'm not a savy VBA user but I think I'm posting and running
the Macro correctly. Do you have any other suggestions, the folks at my
office can run the same macro without issue, so I'm trying to troubleshoot
what is different on my machine but have come up empty. Thank you for your
assistance.

Jonathan
 
J

JBURNS

Steve,
I really appreciate your help/time. So far here is where I’ve gotten with
the troubleshooting running my office’s previous Macro and the one you
provided:

1. Another user logged on my PC and encountered the same errors (both
macros). When he tried to run your Macro on his PC he encountered the same
error, however he’s had luck with the other one.

2. Did a ‘walk through’ of all the settings of a ‘working’ PC with mine for
the settings in the PowerPoint options. The only differences was the default
setting ‘save as version 97-2003’ which I changed the default setting on
mine…exited…restarted and still no luck.

3. When I did try to run both Macros (at separate times), when I selected
the ‘Debug’ option… I had the following portions highlighted yours & ours
respectively:

If ActiveWindow.Selection.ShapeRange.Count <> 1 Then

ActiveWindow.Selection.ShapeRange.PictureFormat.CropRight = 770.03


I’m checking with our Help desk to see if they’ve run an update that would
interfere, but so far they don’t have a lot of Macro experience. If you have
any options/troublehooting suggestions they would be greatly appreciated.
Thanks,
Jonathan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top