Error on Merge function of word document as 'Command Failed'

M

Maheshsinh

I want to merge two word document in one document using c#.
I am getting a error as 'Command Failed', when i call the Merge function of
the word document object.
This Merge function expects path of a document which need to merge.
Following is the code i am using....

Word.Application _wordApplication = new Word.ApplicationClass();
Word.Document _aDoc = new Word.DocumentClass();
_wordApplication.Documents.Add(ref _template, ref _falseValue, ref _docType,
ref _visible1);
_aDoc = _wordApplication.Documents.Item(ref obj);
_aDoc .Activate();
_aDoc.Merge(@"C:\doc2.doc"); // I am getting error at this line as 'Command
Failed'


Thanks & Regards
Maheshsinh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top