Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,
for export data to word , following commands will be faces to error:
C#
ApplicationClass WordApp = new ApplicationClass();

thanks
Posted
Updated 5-Aug-13 22:42pm
v3

1 solution

1.Do you add reference Microsoft Word 10.0 Object Library?
After adding reference you can create instance like:
C#
Word.ApplicationClass oWordApp = new Word.ApplicationClass();

See..
Microsoft Word Documents from ASP.NET[^]

2.You can use Microsoft.Office.Interop.Word Namespace and do something like:
C#
Application application = new Application();
Document document = application.Documents.Open("C:\\word.doc");
 
Share this answer
 
v3
Comments
Adarsh chauhan 6-Aug-13 4:49am    
I agree.. +5
ridoy 6-Aug-13 4:59am    
Thank you.
Thanks7872 6-Aug-13 4:57am    
Hmmmm....Makes sense and needs +5...↑voted...!
ridoy 6-Aug-13 4:59am    
Thanks Rohan,:)

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