How To Delete Anchors In Word 2016 For Mac



Text anchors are useful things. InDesign uses them as targets for cross-references, hyperlinks, and bookmarks (when you create a bookmark, a text anchor is created behind the scenes), and you can add text anchors for your own use. When you delete a bookmark, its associated text anchor is deleted along with it. But when you delete hyperlinks and cross-references, their destination text anchors remain in the document.

This can lead to many orphaned text anchors. Though they do no harm other than cluttering some of the hyperlink dialogs, I like to get rid of orphaned anchors every now and then. Unfortunately, it's not possible in InDesign to get an overview of what a document's anchors are used for.

How To Delete Anchors In Word 2016 For Mac

Remove line numbers. You can remove line numbers from the entire document, from a section, or from a paragraph. Click in the document, or click in the section or paragraph from which you want to remove line numbers. If you want to remove line numbers from multiple sections, select the sections. Each section break controls the layout and formatting of the section previous to the break. For example, if you delete a section break, the text before the break acquires all the formatting of the section that follows the break. In the illustration above, if you delete the first.

Word can be a little unruly sometimes, making inexplicable changes, inserting text you didn't ask for, and hijacking your formatting. Here are some common stunts that Word tries to pull on unwary. I'm using Word 2016 (desktop) on a Windows 10 64-bit system. Styles have always been around, and although you can implement them in older versions, the step-by-step instructions will differ.

Another shortcoming in the way that InDesign manages its anchors is that it's not possible to show where anchors are. It's sometimes useful to see an overview of the text anchors in a document, on a page, or in some selected text.

The only thing that InDesign has to offer to manage text anchors (using the term 'manage' very loosely here) is the Hyperlink Destination Options window:

Anchors

You can rename a text anchor and you can move an anchor to the current text insertion point – or so you're led to believe, but it doesn't work: the anchor is moved to the beginning of the story.

The script described here addresses all this and adds functionality. It lists all text anchors in a document and shows if they are in use and if yes, what they are targeted by:

The first column shows the name of all text anchors in the document; in the second column you see what the anchor is targeted by ('Xref' for 'cross-reference'), and the third column displays the name of the source. If columns 2 and 3 are empty, the text anchor is not targeted by anything in the document, though it could be targeted by a hyperlink in another document.

If a text anchor is used by more than one hyperlink or cross-reference, only one instance is listed (after all, there's just one text anchor) and the types and names are shown separated by a slash.

If you have several documents open and a text anchor is targeted by a hyperlink or cross-reference in another document, the source type and source name are marked with an asterisk.

The text field and the buttons function as follows. Most functions are pretty straightforward.

Text field

The text field can be used to filter the list. When I type drop there and press the tab key (or click outside text field), the list is filtered to contain only the anchors whose name contains drop:

To show only the anchors whose name begins with drop, enter ^drop – you can use standard JavaScript regular expressions in the field.

Go to selected

The text anchor is selected and the script sets the zoom to 400% so that the selected anchor becomes visible.

Rename

Rename the text anchor.

Move to ip

This fixes the InDesign move function. To move a text anchor, select the insertion point that you want to move the anchor to and click Move to ip.

Delete selected

How To Delete Anchors In Word 2016 For Mac Download

Delete the selected text anchors. You can delete only unused anchors. And remember that if an anchor is flagged as unused it could be the target of a hyperlink or cross-reference in another (unopened) document.

Select unused

Select all text anchors in the document that aren't targeted by anything. Remember that anchors flagged as unused could be the target of hyperlinks or cross-references in other (unopened) documents.

Show anchors

2016

To display the location of anchors, click Show anchors. The script adds small anchored frames at the page edge and adds the anchor's name to the frame. To make visible the line that connects the anchored frame and its anchor – as in the screenshot – make sure that text thread display is enabled (View > Extras > Show Text Threads), and select the text frame that contains the anchored frame:

Here, stack difference Mac/PC is the name of the text anchor that's at the beginning of the word differently.

With nothing selected, all text anchors in the document are displayed; with a selection, only the anchors in the selection are shown. (Note: when you select a text frame, the script shows the anchors much quicker than when you select some text.)

Note that InDesign shows text anchors in the story editor:

But that won't tell you the name of that anchor, and the story editor can be very sluggish in long documents.

Delete displayed anchors

To remove all displayed anchor frames, click Delete displayed anchors – this removes just the text frames with anchor names, not the anchors. The styles that were created (a paragraph and an object style) and the swatch are deleted too.

Version history

8 Aug. 2020: The script now shows only the text anchors in the open document(s).

24 July 2020: Caught a fatal InDesign exception when deleting displayed anchors.

20 Nov. 2019: Fixed a bug in the display of anchor types.

29 Dec. 2018: (a) If the document contains a hyperlink that targets an anchor in a document that's not available, the script crashed. Fixed. (b) Added a note in the text to say that if columns 2 and 3 are empty the anchor is not targeted by anything in the document but could be targeted by a hyperlink in a document that is not available.

4 Mar. 2018: (a) If a text anchor was the source of more than one hyperlink and/or cross-reference, each instance was listed separately. Fixed (see the text for details); (b) if an anchor's source is in another document, the source name and type are marked with an asterisk; (c) the window can now be resized.

1 Jan. 2017: If an anchor was in a table or in a footnote, the 'Go to selected' function didn't work properly. Fixed.

8 May 2016: Added code to get around the problem that listboxes don't display in CS6 on Windows 10.

10 Apr. 2016: Largely rewrote the script and added some functions (filtering the display, move anchors).

Box

How To Delete Anchors In Word 2016 For Mac 7

19 Oct. 2014: Added a button Show anchors to show where a document's text anchors are. Names are aded in anchored frames. And a button to delete those frames.

3 Dec. 2012: Added a note to say that I discovered that in 2010 Gerald Singelmann wrote a script that has some of the functionality of my script (http://www.indesign-faq.de/de/textanker-pflegen).

26 August 2012: First posted.

Useful script? Saved you lots of time?

Consider making a donation. To make a donation, please press the button below. This is Paypal's payment system; you don't need a Paypal account to use it: you can use several types/brands of credit and debit card.

For

Questions, comments? Get in touch