Macro Language Reference > Macros > Tag > ttagdel
  
ttagdel
Description
Deletes a tag. Any frames or pages that contain references to the tag will have the references removed. Style tags are deleted, but the codes that refer to them in the text are not changed in any way unless you specify a repl tag name tag and enable update_text.
* 
When deleting a tag in this way the whole of the contents of the tag is removed, including any text stream, object graphic, raster graphic or over/underlay layout that it stands for.
 
Example 274. Delete a specified tag
The macro below will delete the body tag from the current document
ttagdel "body
 
Example 275. Select and delete multiple tags of type .rf
Use one of the tag type codes listed under ttagmk followed by an asterisk character to invoke a dialog box that displays all tags of that type. You can then select the tag(s) to be deleted from this dialog. The macro shown below will display tags of one type only in the dialog box, i.e. reference tags:
ttagdel "rf*
 
Example 276. Select and delete style tags starting with b
The macro shown below displays in a dialog box all style tags in the current document that begin with b. You can select the tag(s) to be deleted from the dialog:
ttagdel "st?b*
Syntax
ttagdel del tag name:t? ( repl tag name:t? ) update text:n? code:t?
ttagdel
[no parameter]
Invoke the Delete tag(s) dialog box.
del tag name
The name of the tag to be deleted. This must be a tag name that already exists. If it does not the Delete Tag dialog box will appear to allow you to enter the correct name, or select from a drop-down list of tags.
repl tag name
The name of a tag with which to replace the tag being deleted. update text must be enabled to complete this action.
update text
0
Do not update text
1
Update text by performing a Search and Replace action for all references to tag_name. Note that the Search and Replace may inadvertently pick up uses of del tag name in some unusual contexts.
code
You can alternatively use one of the tag type codes listed under ttagmk followed by an asterisk character to invoke a dialog box that displays all tags of that type
Related Links