News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

IDs of shapes created by shape operations

Started by Yacine, June 11, 2010, 05:51:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yacine

How do I get the IDs of newly created shapes (in a macro) by shape operations like join, combine, trim, etc.

The fragment method is for example described by MS as follows:
QuoteBreaks selected shapes into smaller shapes.
expression.Fragment

expression   A variable that represents a Selection object.

Return Value Nothing

Remarks
Using the Fragment method is equivalent to clicking Fragment on the Operations submenu of the Shape menu. The produced shapes are the topmost shapes in the containing shape of the selected shapes. They inherit the formatting of the first selected shape and have no text.

The original shapes are deleted and there aren't any shapes selected when the operation is complete.
Comparing the new page's list of shapes with the previous one does not seem to me the right solution.

any help is highly appreciated.
Yacine

JuneTheSecond

#1
One of the ways is to use ShapeAdded events.
Decide the information, user defined cell ,shape data or shape name,
to give the new shapes before each operation.
Give the decided information to the newly added shapes in the ShapeAdded events.
Best Regards,

Junichi Yoda
http://june.minibird.jp/

Yacine

Yacine

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 184 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1093KB.
Tokens: post-login.
Cache hits: 13: 0.00176s for 26,732 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]