Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,

In sharepoint 2010 custom pages i have write the code for converthtmltoword genereation
in that i add namespace using Microsoft.Office.Interop.Word;

but it showing the error like

"An error occurred during the compilation of the requested file, or one of its dependencies. The type or namespace name 'Interop' does not exist in the namespace 'Microsoft.Office' (are you missing an assembly reference?)"


How to add dll for microsoft dll for sharepoint custom pages
Posted
Comments
Sergey Alexandrovich Kryukov 24-Feb-14 2:52am    
What do you mean by "added namespace"? Namespace is added to the assembly you reference, not you...
The idea is: you should not get to advanced fields of programming before you read enough on basics of .NET...
—SA
Is Office installed on your system or server?
Manohar_manu 24-Feb-14 3:46am    
yes..And i also copied dll to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI

1 solution

You don't "add" a namespace. You don't "add" a DLL. You add a reference to an assembly. Namespace are majorly irrelevant, they are just the prefixes to the name of top-level types, a way to reduce possible name clashes. It is possible that you don't know how assemblies and namespaces work. Just read on both topics.

To reference an interop assembly, you can, for example, click the "Reference" not of your project in Solution Explorer or Visual Studio. Use the .NET tab of the "Add Reference" window. The Office interop assemblies will appear depending on what Office applications are installed and their versions.

—SA
 
Share this answer
 

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