shape.PowerClip.Shapes
Shapes inside the container. From here FindShapes can reach text — that's the one line that finds text through a container.
Signature
shape.PowerClip.Shapes
Notes
Shapes inside the container. From here
FindShapes can reach text — that's the one line that finds text through a container.Python example (runnable)
Requires
pywin32. The example assumes app / doc / page / layer are already connected.
See Connection & InitPython
page = doc.ActivePage
# find every frame on the page and read the text inside
for i in range(1, page.Shapes.Count + 1):
s = page.Shapes.Item(i)
try:
pc = s.PowerClip
except Exception:
pc = None
if pc is None:
continue
inner_texts = pc.Shapes.FindShapes("", 6, True) # text inside the container
print("container", i, "holds", pc.Shapes.Count, " object(s), text: ", inner_texts.Count, " item(s)")
for k in range(1, inner_texts.Count + 1):
print(" text: ", inner_texts.Item(k).Text.Contents)
About this section: PowerClip
PowerClip — clipping content into a frame.
- This section has 5 entries; this is one of them.
- See the full section index: PowerClip
Other entries in this section
- shape.AddToPowerClip(clipShape, centerInParent)Puts the current shape inside the clipShape container. The second argu
- shape.PowerClipThe container object. A read-only door — you can inspect the contents
- shape.PowerClip.Content?The generic entry point for container contents. Naming varies between
- shape.PowerClip.Extract?Pulls the contents out, the API equivalent of Extract Contents. Behavi