Click here to Skip to main content
16,017,650 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using VS2008 and MS office word 2007. Initially I was getting error at following code :
mw.Application wrdApp = new mw.Application();

To solve that problem, I used DCOMCNFG. I have added ASPNET user and I have set the identity to Lounching user. Now that problem is solved.

Here is main problem, when I use the following statement, I am trying to open the document. I do not get any exception as well as there isn't anything in event log. but it doesn't open the file. It just hangs. I don't know what to do and what is worng.

mw.Document wrdDoc = wrdDocs.Open(ref wdFile,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing);










Please help.

Thanks and Regards,
RAKESH
Posted

1 solution

try this.

C#
object oIsVisible=true;

mw.Document wrdDoc = wrdDocs.Open(ref wdFile,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref oIsVisible);

wrdDoc .activate();
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900