Bryce Bassett
asked on
PowerPoint VBA: How to manipulate slide background picture?
Hi,
I've built a fairly sophisticated dialog to let users of my PowerPoint add-in adjust the positioning, scale, and zoom of a slide background photo image.
When I have set the background picture to tile as a texture (using currentslide.Background.Fill.TextureTile = True), then VBA lets me set the offset and scale, using these methods:
currentslide.Background.Fill.TextureHorizontalScale =
currentslide.Background.Fill.TextureVerticalScale =
currentslide.Background.Fill.TextureOffsetY =
currentslide.Background.Fill.TextureOffsetX =
However, when the background picture is NOT set to tile as texture (currentslide.Background.Fill.TextureTile = False), I can't find the methods for VBA to control these Offset values?
Does anybody know where to find these methods?
I've built a fairly sophisticated dialog to let users of my PowerPoint add-in adjust the positioning, scale, and zoom of a slide background photo image.
When I have set the background picture to tile as a texture (using currentslide.Background.Fill.TextureTile = True), then VBA lets me set the offset and scale, using these methods:
currentslide.Background.Fill.TextureHorizontalScale =
currentslide.Background.Fill.TextureVerticalScale =
currentslide.Background.Fill.TextureOffsetY =
currentslide.Background.Fill.TextureOffsetX =
However, when the background picture is NOT set to tile as texture (currentslide.Background.Fill.TextureTile = False), I can't find the methods for VBA to control these Offset values?
Does anybody know where to find these methods?
ASKER
I would rather not tile the picture. Based on my experiments, when PowerPoint brings in a picture background it automatically squeezes or stretches it as needed to fill the entire slide. Turning on picture tiling discards this information and resets the picture to its original resolution, so you only see the upper left hand corner of it.
This is not tiled
If you turn on tiling, this is what you see:
The whole point of my dialog is a user who says to himself, "that's almost what I want, I just want to squeeze it or move it a little bit." If I covert to a tiled picture, it changes it entirely. Yes, they can use the controls to bring it back to what they started with, but I'm trying to avoid them needing to do that. I want to leave the picture untiled, so it's exactly the same as they were just looking at, then they use those 4 offset commands to do their minor tweak.
So the question remains...does VBA expose those 4 offset controls, for a non-tiled picture background, or not?
Thanks.
This is not tiled
If you turn on tiling, this is what you see:
The whole point of my dialog is a user who says to himself, "that's almost what I want, I just want to squeeze it or move it a little bit." If I covert to a tiled picture, it changes it entirely. Yes, they can use the controls to bring it back to what they started with, but I'm trying to avoid them needing to do that. I want to leave the picture untiled, so it's exactly the same as they were just looking at, then they use those 4 offset commands to do their minor tweak.
So the question remains...does VBA expose those 4 offset controls, for a non-tiled picture background, or not?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, John.
That was what I feared. Thanks for this definitive answer.
As you can tell, this relates to my earlier question. That workaround of saving a surface image to a temporary file, then loading the temp file in as the background image, works nicely.
That was what I feared. Thanks for this definitive answer.
As you can tell, this relates to my earlier question. That workaround of saving a surface image to a temporary file, then loading the temp file in as the background image, works nicely.
Mainly asking out of curiosity