Microsoft KB Archive/244379

= PPT2000: How to Find the Name of an Object =

Article ID: 244379

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft PowerPoint 2000 Standard Edition

-



This article was previously published under Q244379



SUMMARY
When working with several shapes, frames, or other objects, it is best to work with the shape's name, rather than its index position, because the index can vary with the shape's layer. This article describes how to find an object's name.



MORE INFORMATION
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. NOTE: The following macro examples work only in PowerPoint. Visual Basic for Applications macros are not supported by the Microsoft PowerPoint Viewer. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

Getting Object Names
Although you can work with the index position for visible objects, if you plan to hide and make visible a shape or text frame, find out the name of the object as follows:  In slide view, click to select the shape or frame whose name you want to retrieve. On the Tools menu, point to Macro, and then click Visual Basic Editor. If the Immediate window is not visible, click Immediate Window on the View menu.  Type the following line of code in the Immediate window, and press ENTER: Debug.Print ActiveWindow.Selection.ShapeRange.Name 

This returns the name of the selected object, and prints it below the command. This is the actual name of the selected slide object.

Additional query words: vba ppt ppt2k 2k 2000 ppt2000 9.0 ppt9

Keywords: kbdtacode kbhowto kbprogramming KB244379

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.