Hey Fatty,
You have led me to a flaw in the code.
Other than a Locked layer, why would the property be unavailable?
I did some more testing & if the layer the attribute is on is locked it will fail.
So another test is needed to prevent that failure.
But what other condition would prevent the tag replacement?
Bad tag name is the only thing that comes to mind. Anyone know of another?