Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How does PowerPoint manges the shapes inside one slide?

Currently I met a problem for Office Development. The problem is below:
we are developing Office add-ins, one feature is trying to insert some
images into a PowerPoint "slide", at the first beginning in a typical first
slide, there is a "Title" and "SubTitle" text box, then we insert 2 pictures
which got from another Excel process, we use "ClipBoard" and
Slide.Shapes.PasteSpecial(), and the 2 pictures are named "Picture 2" &
"Picture 3", at this time we insert another picture into current slide, and
this time we found the names of the shape inside current slide a "Title
1", "SubTitle 1", "Picture 2", "Picture 3", "Picture 2", so there are 2
shapes with the same name "Picture 2", so I'm wondering how does powerpoint
manage the shapes in the slide? In my opinion, the shape name should be used
as a key to distinguish each other. Is this behavior expected? Because
sometimes I found the new inserted picture will be named "Picture X", which
is different from the name that already in the slide. I'm a little confused.
Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default How does PowerPoint manges the shapes inside one slide?

I don't believe I've seen this, but you can try this bit of code in PowerPoint

Dim mySlide as PowerPOint.Slide
Dim myShape as PowerPoint.Shape

for each mySlide in ActivePresentation.Slides
for each myShape in mySlide.shapes
Debug.print myslide.slideindex, myshape.name, myshape.top,
myshape.left
next myshape
next myslide

This will list out the slide #, the shape name and the distance from the
left and top.

"fmamstr" wrote:

Currently I met a problem for Office Development. The problem is below:
we are developing Office add-ins, one feature is trying to insert some
images into a PowerPoint "slide", at the first beginning in a typical first
slide, there is a "Title" and "SubTitle" text box, then we insert 2 pictures
which got from another Excel process, we use "ClipBoard" and
Slide.Shapes.PasteSpecial(), and the 2 pictures are named "Picture 2" &
"Picture 3", at this time we insert another picture into current slide, and
this time we found the names of the shape inside current slide a "Title
1", "SubTitle 1", "Picture 2", "Picture 3", "Picture 2", so there are 2
shapes with the same name "Picture 2", so I'm wondering how does powerpoint
manage the shapes in the slide? In my opinion, the shape name should be used
as a key to distinguish each other. Is this behavior expected? Because
sometimes I found the new inserted picture will be named "Picture X", which
is different from the name that already in the slide. I'm a little confused.
Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How does PowerPoint manges the shapes inside one slide?

Oh, this indeed happened. I have some information that "never reply on the
shape.name" to distinguish it. Where can I find some documentation on these
API?The one in MSDN is too simple to have a better understanding/use of
Office API.

"Barb Reinhardt" wrote:

I don't believe I've seen this, but you can try this bit of code in PowerPoint

Dim mySlide as PowerPOint.Slide
Dim myShape as PowerPoint.Shape

for each mySlide in ActivePresentation.Slides
for each myShape in mySlide.shapes
Debug.print myslide.slideindex, myshape.name, myshape.top,
myshape.left
next myshape
next myslide

This will list out the slide #, the shape name and the distance from the
left and top.

"fmamstr" wrote:

Currently I met a problem for Office Development. The problem is below:
we are developing Office add-ins, one feature is trying to insert some
images into a PowerPoint "slide", at the first beginning in a typical first
slide, there is a "Title" and "SubTitle" text box, then we insert 2 pictures
which got from another Excel process, we use "ClipBoard" and
Slide.Shapes.PasteSpecial(), and the 2 pictures are named "Picture 2" &
"Picture 3", at this time we insert another picture into current slide, and
this time we found the names of the shape inside current slide a "Title
1", "SubTitle 1", "Picture 2", "Picture 3", "Picture 2", so there are 2
shapes with the same name "Picture 2", so I'm wondering how does powerpoint
manage the shapes in the slide? In my opinion, the shape name should be used
as a key to distinguish each other. Is this behavior expected? Because
sometimes I found the new inserted picture will be named "Picture X", which
is different from the name that already in the slide. I'm a little confused.
Thanks.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
hyperlink to a powerpoint slide Papu Excel Worksheet Functions 1 May 18th 08 07:07 AM
How do I create a new slide in PowerPoint from Excel using VBA? LilacSpokane Excel Programming 0 February 21st 08 10:46 PM
powerpoint slide show .pps Kevin Excel Programming 3 September 29th 06 05:02 AM
slide numbers in powerpoint georgina[_2_] Excel Programming 1 September 8th 04 01:04 PM
Using excel vba to produce a powerpoint slide KDUT Excel Programming 1 May 13th 04 01:56 PM


All times are GMT +1. The time now is 01:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"