Hi,
In the corel designer there is a macro for renumbering callouts. However, it only works if the callout is executed with the incremental function.
I need a macro that reads the number from the selected callouts and counts each callout one number up or down without being incremental.
Could you help me?
I do not understand almost anything...
Do those callouts keep only one number? In Corel a callout shape is of type 'cdrPerfectShape'. So they can be found and count. But 'cdrPerfectShape' is also a banner, an arrow, a basic shape etc. In order to count them we must know what else is on the layout.
How the text keeping the numbers has been put on the callout?
Is each text grouped with each callout?
When you say 'count each callout up or down', what do you mean? If, for instance, there are callouts keeping 15 numbers from 10 to 30, but not all the range, the necessary macro must 'understand' which is the minimum, the maximum, and return an array of sorted them? How to 'count up or down'?
Can you show us an example of such a layout and what is necessary to be done on it?
No Problem. I've made a examplepicture.
OK. Now I understood the part about incrementing the existing numbers...
But I asked some other questions in order to understand how to find/select/collect those text boxes to be incremented...
Are they text boxes?
Should we forget about callouts and just look at the text boxes? Are the text boxes grouped with the callout (or something else)?
In the object manager, it looks like that.
I don't know, if we can forget the callouts and can only look at the text boxes.
Select the shapes in discussion, try this and tell me what happens:
1 2 3 4 5 6 7 8
Sub testIncrementTextNumbers() Dim shR As ShapeRange, shTxt As Shape, shRTxt As ShapeRange Set shR = ActiveSelectionRange Set shRTxt = shR.Shapes.FindShapes(, cdrTextShape) For Each shTxt In shRTxt.Shapes shTxt.Text.Story = CLng(shTxt.Text.Story) + 1 Next End Sub
Perfect. Works perfect. Thanks for your great help.