Hello,
I get the “Command Failed” exception when using the following code to insert content from one word 2007 document into another using bookmarks in c# :
string filePath = @“C:\temp\one.doc”;
object trueObj = true;
object falseObj = false;
wordApp.Selection.InsertFile( filePath, ref missing, ref falseObj, ref trueObj, ref falseObj );
"one.doc" is another word document containing table content.
Error code: -2146824090. This error generally comes when the target object is disposed or unavailable. Not sure why I am getting it here.
Also when I remove table content from the target document and I just add formatted text, the operation succeeds. When the same operation is performed through word GUI, the operation works fine. Have scoured the internet for pointers on this issue, but none were helpful in resolving this.
Thanks in advance,
Bharath K.