Relocate/move shapes (W)

Modified on Mon, 5 Oct at 1:54 PM

BaseExtensions can be used to relocate shapes and tables in Word, and align them either to margin or to page as well as either horizontally or vertically.

Module is located here:

Code
...\ModuleLibrary\BaseExtensions\01_nocontext_Tools\17_W_relocateShapes.xml

CMD

<Cmd case="BaseExtensions:move-shape"/>

Parameters

alignToMargin

Define true if selected shape should be aligned to margins in the document.

alignToPage

Define true if selected shape should be aligned to page in the document.

vertical

top

Align shape vertically at the top.

center

Align shape vertically in the center.

bottom

Align shape vertically in the bottom.

horizontal

left

Align shape horizontally to the left.

center

Align shape horizontally in the center.

right

Align shape horizontally to the right.

distanceVertical

Add a vertical distance between either page or margin edge to middle of page.

distanceHorizontal

Add a horizontal distance between either page or margin edge to middle of page.

In one button, two commands must be present, where the first will move shape horizontally and the second will move shape vertically. Here is an example:

XML
<Cmd case="BaseExtensions:move-shape" horizontal="right" alignToMargin="true" distanceHorizontal="1"/>
 <Cmd case="BaseExtensions:move-shape" vertical="top" alignToMargin="true" />

These commands will move the shape to be located horizontally to the right with a distance of 1 cm to the margin, and vertically at the top aligned to the margin.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article