Re: How do I determine the image file used for a fill in code?
- From: "Shyam Pillai" <msgbox@xxxxxxxxx>
- Date: Wed, 22 Jun 2005 09:48:54 +0530
You are out of luck there. This is something which was surprisingly left out
from the object model. Though you cannot determine which file was used, you
can extract the original image from with PowerPoint (2000+) by using the
hidden Export method for a shape.
Interestingly, when you use the Export method on the shape with a user
background picture/texture fill (Same as right-click on shape| Saves as
picture...) to export it as *EMF*, you get the original image that was used
to provide the background fill and not an export of the complete shape. Any
other format and you will get the PowerPoint shape. A bug which can be used
to your benefit.
Call ActiveWindow.Selection.ShapeRange(1).Export("E:\test\test.emf",
ppShapeFormatEMF)
--
Regards,
Shyam Pillai
Animation Carbon: http://skp.mvps.org/ac/
"MrBo" <MrBo@xxxxxxxxxx> wrote in message
news:e9YFc3ndFHA.3808@xxxxxxxxxxxxxxxxxxxxxxx
> I'm aware of that, however I'm trying to do this programmatically in VBA!
>
> "Geetesh Bajaj" <geeteshREMOVECAPS@xxxxxxxxxxx> wrote in message
> news:ObStnXndFHA.2688@xxxxxxxxxxxxxxxxxxxxxxx
>> If you just want the name, double-click the AutoShape to summon the
>> Format
>> AutoShape dialog box.
>>
>> Then choose the Colors and Lines tab and click the downward pointing
>> arrow
>> for the Fill Color and choose Fill Effects in the flyout menu.
>>
>> Then choose the Picture tab in the Fill Effects dialog box. Right below
> the
>> picture, you'll find the name of the picture.
>>
>> --
>> Geetesh Bajaj, Microsoft PowerPoint MVP
>> http://www.indezine.com
>> http://www.ppted.com
>>
>>
>>
>> "MrBo" <MrBo@xxxxxxxxxx> wrote in message
>> news:O5VkYimdFHA.2212@xxxxxxxxxxxxxxxxxxxxxxx
>> > All
>> > I'm trying to programmatically determine which image file is currently
>> being
>> > used to fill an autoshape.
>> > I can set this file for an autoshape but so far have been unable to
>> > read
>> > this filename in code.
>> > Any help gratefully appreciated.
>> >
>> > Menu:-
>> > Select autoshape, right click-Format Autoshape-Colors and Lines
>> > tab-Fill-Color:-Fill Effects-Picture Tab-Select Picture
>> >
>> >
>> >
>>
>>
>>
>
>
.
- References:
- Prev by Date: Re: How can I view and edit two presentations side by side?
- Next by Date: Re: Remove template from one page in Powerpoint 2000?
- Previous by thread: Re: How do I determine the image file used for a fill in code?
- Next by thread: Flash file does not run
- Index(es):
Relevant Pages
|