Jump to fields (W)

Modified on Mon, 5 Oct at 1:53 PM

BaseExtensions can be used to find and jump to both next and previous field in Word. With different commands we can target either content controls, macro fields or a combination of the two.

Content controls

Module is located here:

Code
...\ModuleLibrary\BaseExtensions\01_nocontext_Tools\48a_W_jumpToField.xml

CMD to find next content control

Below command jumps to next content control present in the document.

<Cmd case="BaseExtensions:find-next-cc"/>

CMD to find previous content control

The following command jumps to previous content control present in the document.

<Cmd case="BaseExtensions:find-prev-cc"/>

Parameters

skipNamedFields

Define this parameter to be true if the command should skip jumping to content controls that have a title. If false, it cycles all content controls.

equalTagTitle

Define whether the command should jump to content controls, where the title and tag are equal (empty ones does not count). If this parameter is defined to be true, content controls with equal title and tag will be included when jumping to next. If false, or not defined, the command will skip these.

Macro fields

Jumping between macro fields is a built-in Word functionality, so we can achieve this in Alloy by executing the MSO function:

<Cmd case="BaseExtensions:execute-mso" Word="FieldNext"/>

Content control or macro field

The commands above can be filtered in an if statement. For instance, the module could filter based on a custom document property.

A common case for clients is that their legacy, pre-Templafy, documents utilise Macro fields, while Templafy uses Content Controls. By filtering on document property TemplafyTenantId we can support both cases.

This module is located here:

Code
  ...\ModuleLibrary\BaseExtensions\01_nocontext_Tools\48b_W_jumpToFieldTemplafy.xml

Here, the user is able to jump to next field with F11 and to previous field with Shift+F11.

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