PC Review


Reply
Thread Tools Rate Thread

How do I determine the image file used for a fill in code?

 
 
MrBo
Guest
Posts: n/a
 
      21st Jun 2005
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


 
Reply With Quote
 
 
 
 
David M. Marcovitz
Guest
Posts: n/a
 
      21st Jun 2005
I could be wrong, but I think that unless you use code to put the picture
in, you have no way of knowing that information. PowerPoint embeds the
picture, so it doesn't need any information about the original file.
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/

"MrBo" <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> 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
>
>
>


 
Reply With Quote
 
Geetesh Bajaj
Guest
Posts: n/a
 
      21st Jun 2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>




 
Reply With Quote
 
MrBo
Guest
Posts: n/a
 
      21st Jun 2005
I'm aware of that, however I'm trying to do this programmatically in VBA!

"Geetesh Bajaj" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >
> >
> >

>
>
>



 
Reply With Quote
 
Geetesh Bajaj
Guest
Posts: n/a
 
      22nd Jun 2005
Oops.


--
Geetesh Bajaj, Microsoft PowerPoint MVP
Good Earth: http://www.ppted.com/001100/017/
PowerPoint Notes: http://www.indezine.com/notes





"MrBo" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm aware of that, however I'm trying to do this programmatically in VBA!
>
> "Geetesh Bajaj" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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
> > >
> > >
> > >

> >
> >
> >

>
>



 
Reply With Quote
 
Shyam Pillai
Guest
Posts: n/a
 
      22nd Jun 2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm aware of that, however I'm trying to do this programmatically in VBA!
>
> "Geetesh Bajaj" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > 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
>> >
>> >
>> >

>>
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to print .tif image file from form shoostry343 Microsoft Access VBA Modules 0 13th Oct 2006 04:09 AM
determine the pixel resolution of an image file Bruce Microsoft ASP .NET 4 24th May 2006 06:05 AM
Code to determine if record exists in file =?Utf-8?B?UGF0dHk=?= Microsoft Access VBA Modules 1 17th Dec 2005 07:56 AM
How do we load an image file into a picturebox in code ? One Handed Man \( OHM - Terry Burns \) Microsoft VB .NET 14 11th Sep 2004 04:49 PM
Determine if an image has focus after leaving another image. Thomasa Gregg Microsoft ASP .NET 1 28th Jun 2004 05:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:59 AM.