Data Exchange MS Word 2000
-
I am writing a data exchange tool in asp.net (c#). I', looking to access data in csv or xml files or word 2000 documents. The first two are relatively simple but I'm strufggling a little on the Word 2000 interoperability. I am using a text editor and command line compiler and have no choice but to do this as I do not have access to an IDE to reference a com object with that nice point, click and go functionality. I've looked at the tlbimp and SDK sample but just don't seem to be getting it I'm afraid, (Monday morning brain-block?). I can adapt the SDK Word Interop sample and use a bat file to create what I believe should be a Wrapper for Word called Word.dll, and successfully compile my application referencing the metadata from the word.dll
tlbimp "%ProgramFiles%\Microsoft Office\Office\msword9.olb" /silent /out:Word.dll IF NOT EXIST bin mkdir bin %CORPATH%csc /t:library /out:bin\DataExchange.dll /r:System.dll /r:System.Web.dll /r:System.Xml.dll /r:System.Data.dll /r:Word.dll /optimize+ /recurse:*.cs
However, when i change my .cs files to reference interop services and the Word wrapper;using System.Runtime.InteropServices; using Word;
...I get the follwing compiler errors; Default.cs(16,32): error CS0234: The type or namespace name 'Web' does not exist in the class or namespace 'Word.System' (are you missing an assembly reference?) Default.cs(19,20): error CS0234: The type or namespace name 'Web' does not exist in the class or namespace 'Word.System' (are you missing an assembly reference?) Default.cs(20,20): error CS0234: The type or namespace name 'Web' does not exist in the class or namespace 'Word.System' (are you missing an assembly reference?) Default.cs(21,20): error CS0234: The type or namespace name 'Web' does not exist in the class or namespace 'Word.System' (are you missing an assembly reference?) Default.cs(22,20): error CS0234: The type or namespace name 'Web' does not exist in the class or namespace 'Word.System' (are you missing an assembly reference?) Default.cs(23,20): error CS0234: The type or namespace name 'Web' does not exist in the class or namespace 'Word.System' (are you missing an assembly reference?) Default.cs(24,20): error CS0234: The type or namespace name 'Web' does not exist in the class or namespace 'Word.System' (are you missing an assembly reference?) but all that is on these lines are my class declaration;public class Default : System.Web.UI.Page
and control declarations