Printing a word document[Resolved]
I wanted to print a word document on the server from my asp.net web application. I am getting an error saying "There is insufficient memory. Save the document now" Here is the code where I am seeing the error:
Code:
Word.Document oWordDoc = oWordApp.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);
I have looked at other web sites but have not found any thing that can fixed it. I have also looked into DCOM for word. Any help is appreciated.
Re: Printing a word document[Resolved]
I got this fixed. Here is what I did:
in the web.config file I added this line
Code:
<identity impersonate="true" userName="computername\username" password="password"/>
To read more about it, search "ASP.NET Impersonation" on msdn