So I have been sitting here for hours trying to figure this out.... I am just newly figuring out that I can complete repetitive tasks by recording a macro, simple right? I am trying to power clip an imported image into a shape via macro but it is not working.. I am getting Run-Time error's... Parameter Index is out of range. I have one "shape" and 25 different car logo's I am needing to powerclip the logo inside the shape with the click of the "macro" and it is just NOT WORKING! I understand that I can complete the task at hand by simply creating 25 bitmaps, one with each logo then simply importing that into my document, but I need to figure this Macro for this out because it will become more complex and time consuming as time goes on and I add more logos and different shapes in which I need to powerclip them into... can anyone help? I am NOT a macro genius... I simply understand that I can hit the "RECORD" button, do what needs done and then hit stop.. then of course do this again later by playing the macro.
Hi.
How do you want it to function?
Can you describe a little more about how you want the macro to distinguish which shape you want to be the container, and which the shape to be inserted.
~John
I would not know how to explain it any better than I did in the initail post. I put together this vid http://www.youtube.com/watch?v=VN-eI4zU044 for an explanation... I appreciate any help you can give me. I don't know if you just cannot use macro to create a powerclip or if there is another issue here that I don't see. Again, I am not by any stretch a pro at any of this so please don't laugh at my video! haha thanks again!
HI.
Besides setting some shortcut keys in draw I don't see a way to get much time saving by using a macro, unless you are meaning to bacth process files somehow.
Here's some sample code for you to look at.
Sub PcIt() Dim sr As ShapeRange, w#, h# Set sr = ActiveSelectionRange 'How to: select container first, shift select object to be placed in container, run macro
sr.Shapes(1).GetSize w, h 'get size of container sr.Shapes(2).SetSize w 'set size of shape to be placed in the container to the same width as the container sr.Shapes(1).AddToPowerClip sr.Shapes(2), cdrTrue 'powerclip it inside centering contents End Sub