Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / November 2006

Tip: Looking for answers? Try searching our database.

selected item in a group in powerpoint

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Staroslav - 07 Nov 2006 09:13 GMT
I am trying to change color properties of a selected item in a group. Having
difficulty identifying in vba which item is selected. All the code I've seen
goes by a certain type of an item, but that is not helpful when you have 30
items of the same type and only one of then needs to be changed.

Any ideas? Thank you ahead of time!
Signature

                           +
                       (       )
                   __ | __ | __
Greetings from Moscow, Russia

John Wilson - 07 Nov 2006 09:56 GMT
Be easier if we could see your code

I guess you know how to name items before you group using vba so do that

Them something like (air code not tested!)

Dim ogp as shape
For Each ogp In ActiveWindow.Selection.ShapeRange.GroupItems
If ogrp.name=*** Then
do whatever
End if
Next

Signature

Did that answer the question / help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html

> I am trying to change color properties of a selected item in a group. Having
> difficulty identifying in vba which item is selected. All the code I've seen
> goes by a certain type of an item, but that is not helpful when you have 30
> items of the same type and only one of then needs to be changed.
>
> Any ideas? Thank you ahead of time!
Staroslav - 07 Nov 2006 11:41 GMT
Naming items in a group in my case is not an option.

Here is part of the code, but I can't identify a selected cell.

       Case msoGroup
           ' If it's a group them iterate thru the items and list them
             For Ctr = 1 To .GroupItems.Count
                'The next condition needs to identify the item that has the
cursor or
                ' is selected otherwise.
                If .GroupItems(Ctr) ??????? Then
                   .GroupItems(Ctr).Fill.ForeColor.RGB = RGB(0, 0, 0)
               End If
             Next Ctr

Signature

                           +
                       (       )
                   __ | __ | __
Greetings from Moscow, Russia

> Be easier if we could see your code
>
[quoted text clipped - 15 lines]
> >
> > Any ideas? Thank you ahead of time!
Shyam Pillai - 07 Nov 2006 15:20 GMT
Use:

If ActiveWindow.Selection.HasChildShapeRange Then
   Debug.Print ActiveWindow.Selection.ChildShapeRange(1).Name
End If

Signature

Regards,
Shyam Pillai

Animation Carbon
http://www.animationcarbon.com

>I am trying to change color properties of a selected item in a group.
>Having
[quoted text clipped - 5 lines]
>
> Any ideas? Thank you ahead of time!
Staroslav - 08 Nov 2006 11:39 GMT
Shyam, thank you! So simple!
Your code made available elsewhere has been a great help to me in trying to
get a measure of control over PowerPoint.
Thank you very much again!
Signature

                           +
                       (       )
                   __ | __ | __
Greetings from Moscow, Russia

> Use:
>
[quoted text clipped - 11 lines]
> >
> > Any ideas? Thank you ahead of time!
Staroslav - 08 Nov 2006 13:27 GMT
Shyam,
Your code works only if the whole object in a group is selected. However, if
the cursor is inside that object, HasChildShapeRange condition is not met.
Why is that? And more importantly, what to do in this case? Thank you.
Signature

                           +
                       (       )
                   __ | __ | __
Greetings from Moscow, Russia

> Use:
>
[quoted text clipped - 11 lines]
> >
> > Any ideas? Thank you ahead of time!
Steve Rindsberg - 11 Nov 2006 04:14 GMT
> Shyam,
> Your code works only if the whole object in a group is selected. However, if
> the cursor is inside that object, HasChildShapeRange condition is not met.
> Why is that? And more importantly, what to do in this case? Thank you.

If ActiveWindow.Selection.Type = ppSelectionText Then
 ' the cursor is in a text frame/text is selected
 Debug.Print ActiveWindow.Selection.TextRange.Parent.Parent.Name
End If

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.