I would like to delete a custom label (created with insertlabel) but can't find it anywhere in the much aplauded Adobe documentation .
I am able to delete the label values, but I want to get rid of the keys as well. I normally clean up documents before delivery, including removal of all artefacts and working materials like notes, lowres images and... labels.
How to delete a custom label?
This is an entirely different kind of label than the ones I'm used to (the Label property), but some experimenting shows you can 'extract' just about any key you want -- it doesn't give an error if the key is not defined, it just returns an empty string.
So at least setting the label to an empty string using insertLabel will remove the data part.
Whether or not the key name is still in your document, who knows? Custom labels should be preserved along INX and IDML exports, so you can export a test document and check the resulting file.
Thanks Jongware, I assume that if you don't know it, it's simply not implemented.
You're also right that it's not the Label property, but it's a helpful feature anyway. I expected it to have Labels.Count etc. but obviously we're left in the dark a bit. Concluding: there is no way to test whether a certain Custom Label exists or not. We can only Extract it's value - if the result is empty we must pretend it's not there.
I found that the private label is indeed stored in a IDML file. For example a label set by
is stored in the designmap.xml part of the IDML file:
<KeyValuePair Key="Uwe" Value="Laubender"/>
You can strip those labels from the IDML by deleting the above properties.
Thanks for your answer, much appreciated.
Does this mean I should first save as indx, edit the xml and then re-open/save as indd?
It strikes me that nobody worries about cleaning up their waste after they're done. Why not a "CustomLabels.Count"...
But thanks anyway!
Europe, Middle East and Africa