Thanks to all of you, especially to Charles. I was able to bookmark text in
document 2 and then import text using insertfile method and it worked.
But I have another issue now, basically how to insert the bookmark text from
document 2 to document 1 in a separate page.
I have to do this process several times(doc1 is linked to a excel worksheet
and whenever the excel sheet data changes, doc1 also changes and we have to
run this process again to insert the bookmark text).
First time I copy the bookmark text from doc 2 to doc1, the bookmark also
gets copied(I copy the bookmark text into a blank page in doc1). Second time
I first delete the bookmark's range in doc1 and then use insertfile to copy
the bookmark text and also to re-create the bookmark in doc1.
It seems to work fine, but then the page formatting gets messed up. If doc 1
is a 5 pages document, it becomes 4 or 6 or sometimes remain as a 5 pages
document depending on the bookmark text.
I want to insert the bookmark text in a separate page irrespective of the
text size and want doc1 to remain as a 5 pages document.
I tried inserting page breaks etc but was not getting a consistent result.
Hope I clearly explained the problem.