Hi,
I am not talking about this way.
Your code - even if could work - assumes that you are able to change the content of some variable A instances and keep other unchanged. It is not possible.
I am talking about changing variableA.contents as global - no matter how many instances are placed inside your doc.
something alike this 1-liner (or just make it in UI):
Doc.TextVariables.Item("variableA").contents = "good one"
(I am not familiar with VBA, sorr)
Jarek