boy_plunder
08-13-2008, 06:07 AM
Bare with me while I explain this one.
I have scripted a number of macros that add a rectangle shape to a page, position it, colours it in some cases, and applies a user selected picture to the rectangle's fill. Using the Fill effects > background setting. All works like a dream.
The problem is that you can't set the value of the little checkbox for the added picture to lock its aspect ratio where you set the picture. Even if you record the setting of this, VBA doesn't recognise it. This means that the picture is stretched to the rectangle.
So... I have a fixed rectangle on the cover page, so I am now trying to pick up the formatting of that one and apply it to a new rectangle I use in the other macros. I have proved this can be done, and applies the little checkbox value I need. The problem I am currently left with, is how can I get the name of the new rectangle to apply the formatting to?
Few! Anybody with a solution for getting the name of a shape I have just created?
:banghead:
I have scripted a number of macros that add a rectangle shape to a page, position it, colours it in some cases, and applies a user selected picture to the rectangle's fill. Using the Fill effects > background setting. All works like a dream.
The problem is that you can't set the value of the little checkbox for the added picture to lock its aspect ratio where you set the picture. Even if you record the setting of this, VBA doesn't recognise it. This means that the picture is stretched to the rectangle.
So... I have a fixed rectangle on the cover page, so I am now trying to pick up the formatting of that one and apply it to a new rectangle I use in the other macros. I have proved this can be done, and applies the little checkbox value I need. The problem I am currently left with, is how can I get the name of the new rectangle to apply the formatting to?
Few! Anybody with a solution for getting the name of a shape I have just created?
:banghead: