I have used the code given in this tutorial
but when opening the document, I get the warning"
"This document contains fields that may refer to other files. Do you want to update the fields in this document?"
While searching for the solution I got the following page:
But still the problem is unresolved. Is there an API call which can stop this popup box when opening the document.