Check for existing smart tag and action

S

Scott

Given a specific Shape object, I'm having trouble figuring out how to check
for the existance of an existing SmartTag and Action setting on it.
Basically I want to delete the smart tag and action associated with a
specific TagName, if they exist.
 
S

Scott

I figured this out and thought it might help others:

' Delete the existing smart tags or actions that might be there
numRows = theShape.RowCount(visSectionSmartTag)

For i = numRows - 1 To 0 Step -1
s = theShape.CellsSRC(visSectionSmartTag, i,
visSmartTagName).ResultStr(Visio.visNone)
If s = "updateFromEcat" Or s = "updateRobot" Then
theShape.DeleteRow visSectionSmartTag, i
End If
Next i

numRows = theShape.RowCount(visSectionAction)

For i = numRows - 1 To 0 Step -1
s = theShape.CellsSRC(visSectionAction, i,
visActionTagName).ResultStr(Visio.visNone)
If s = "updateFromEcat" Or s = "updateRobot" Then
theShape.DeleteRow visSectionAction, i
End If
Next i
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top