Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Powerpoint help

Status
Not open for further replies.

Shyamala

Programmer
Apr 28, 2003
6
0
0
US
Hi Im quite new to powerpoint.
Im having an OLE object (Named object1) in a slide. I am trying to replace that object with a table from an excel sheet. All I am doing is
1. Cutting the OLE Object in the powerpoint slide
2. Copying the table from the excel sheet
3. Pasting the table in the place of Object1.

But after I paste, the pasted object is no longer selected and it gets named with a random name.
I am using powerpoint 2002 with win XP.
Now how do I select this replaced object ?
Any help anyone?
 
Hi,

You can see what object names there are with...
Code:
    For Each shp In ActivePresentation.Slides(1).Shapes
        msgbox shp.Name
    Next
You can find the name in question and then replace the msgbox with an If statement and assign a new name.

Hope this helps :)

Skip,
Skip@TheOfficeExperts.com
 
Thanks for the help. But I can do that if I had to replace only a few objects in a single slide. But I am replacing many objects in aroung 100 slides. Also there is no uniformity. Some slides have 3 objects, some have 2 and some have 1 object to replace.
In powerpoint 2000, whe an object is pasted in a slide, that object is selected by default. But that dosent happen with Powerpoint 2002. Is there a way I can do that ?
 
WOW.
This is the pice of code:

ActiveWindow.ViewType = ppViewSlideSorter
ActivePresentation.Slides.Item(slideName).Select
ActiveWindow.ViewType = ppViewSlide


ActiveWindow.Selection.SlideRange.Shapes ("ObjectToReplace1").Select
ActiveWindow.Selection.Cut
myXL.Application.Sheets(SheetName).Select
myXL.Application.Sheets(SheetName).usedrange.Select
myXL.Application.Selection.Copy
ActiveWindow.View.Paste

MsgBox ActiveWindow.Selection.ShapeRange.name

Here is where I get the error messgage :"Nothing appropriate is curretly selected"

But when I use the same code in PP 2000, it give the object number.

I wonder why !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top