microsoft word / excel interop issue
Posted on 2007-10-17
I am working on word / excel automation asp.net project in which i am copying content from
Excel file to Word file using word template (.dot file).
I am using word & excel object library 11.0 , framework 1.1 on windows 2000 sp4.
//open excel file
oExcelApplic = new ApplicationClass ();
oWorkBook = oExcelApplic.Workbooks.Open(strFileName,0,true,5,"","",false,Excel.XlPlatform.xlWindows,"",false,false,0,false,missing,missing);
oWorkSheet = (Excel.Worksheet) oWorkBook.Worksheets.get_Item(1);
//open word file
oWordApplic = new Word.ApplicationClass();
object fileName = strFileName;
object readOnly = false;
object isVisible = true;
object missing = System.Reflection.Missing.Value;
// I get error at this line after file system change from FAT32 to NFTS
oDoc = oWordApplic.Documents.Open(ref fileName, ref missing,ref readOnly,
ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref isVisible,ref missing,ref missing,ref missing,ref missing);
Initially code was working fine when my file system was FAT32 with <identity impersonate = "true" /> in config file
But after conversion to NTFS I get error while opening word template file.
ERROR:- "There is insufficient memory. Save the document now."
I have given necessary permission for word and excel in dcom manager but still got the same error. I even tried by giving all permissions to Everyone in dcom but in vain.
Please help me in this.
Any link about configuration / permission requirements for using word / excel object libraries?