let say i am using macro A which detects the word 'duck' in google docs automatically but i want the Macro A to highlight the detected word , then what are my available options?
You can long click on the text, but other than that there's not much you can do.
If you got the coordinates and the ability to set magic text with coordinate it would be possible.