Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
is there any way how I can get a list of all the object Ids from a single sheet using a macro?
regards,
MT
Hi you can use below
ActiveDocument.GetSheetObject("CH01")
Regards
ASHFAQ
try like:
Objects = ActiveDocument.ActiveSheet.GetSheetObjects
ID(objects)
For i = lBound(Objects) To uBound(Objects)
ID(i) =Objects(i).GetObjectID
but my question was how i can figure out the object ID?? just to be a little more specific. for example i have a sheet called April and now on this sheet there are 3 pivot charts. how can I get a list of the object ID from these 3 pivot charts.
regards,
MT
You can use QV Plus - Expression Manager to list all the objects by sheet (Type, ID and Caption)
Have a look in APIGuide.qvw. There you will find examples like them from tresesco suggested which is already the right approach for you - loop through each sheet for each object and return the type, id and so on and if it match your condition do something.
Alternatively you could read these kind (and some more) of meta-data from document layout (file --> export --> document layout).
- Marcus