?
Solved

microsoft word / excel interop issue

Posted on 2007-10-17
4
Medium Priority
?
1,054 Views
Last Modified: 2010-05-18
hi,

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.

Code :
//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);

oDoc.Activate();

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?
0
Comment
Question by:techprocess
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
S31B1 earned 2000 total points
ID: 20092057
Trust me, I know from experience, this will not be the first problem you will face if you continue to impliment your solution using this technque. No attempt has been made by microsoft for Word to be used in an unnatended or non-interacive client.

Quote from MS Site:
"Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when run in this environment."

Visit here for a detailed explantion of why it is a bad Idea!
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757
0
 
LVL 4

Expert Comment

by:S31B1
ID: 20092059
If you want to create docs server side, you will need to find a .NET component for Server side cretion of office documents. Some companys with suitable products are: -

Aia Software B.V. - http://www.aia-itp.com
Polar - http://www.polarsoftware.com
SoftArtisans - http://www.softartisans.com
SyncFusion- http://www.syncfusion.com
Keylogix - http://www.activedocs.comback to top
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21091196
Forced accept.

Computer101
EE Admin
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
Suggested Courses
Course of the Month17 days, 9 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question