CasewareDocs

Add

Adds a tag name (ID) of an expected tag to the list of input tags.

Compatability

Available as of IDEA version 9.0

Syntax

Add(tagName As String)

Parameter

tagName

ID of the tag to be added.

Remark

An error is raised if tagName is empty.

Example

Dim Tags As Object
Dim db As Object
Dim fileName As String

Sub Main
'Get the name of the database
fileName = SmartContext-PrimaryInputFile

Set db = Client.OpenDatabase(fileName)
Set MacroCommands = SmartContext.MacroCommands
Set Tags = MacroCommands.TagManagement.CheckTagExistence
'Attaches an IDEA database to check tag existence object
Set Tags.Database = db

'Populates the existing and missing tags collections
Tags.Add "Tag1" 'Check for tag with ID "Tag1"
Tags.Add "Tag2" 'Check for tag with ID "Tag2"
Tags.PerformTask
...
...

'Close the database
db.Close
Set db = Nothing

'Release object
Set Tags = Nothing

End Sub