@Jarek – "anywhere"? No.
They have to be on the same spread, if you want to select them…
@Virender – if you want to address the two text frames without selecting them, this limitation does not apply.
Addressing objects by name is tricky. You have to make sure, that there are no objects with the same name. Otherwise you could end up with the wrong object…
A unique identifier could be the ID number of a text frame…
Uwe