Upload Word Documett should Display in Literal or Label

Dec 17 2008 8:02 AM
Hello Guys,

when i upload any word/excel document in the folder, next time i want that uploaded word/excel document should display in either Label or Literal ....

i have added Reference Microsoft.word 11.0 object library..

this is the code i have used,
Microsoft.Office.Interop.Word.ApplicationClass wordApp = new   Microsoft.Office.Interop.Word.ApplicationClass();
string filePath = inputbox.Value;
object file = FilePath;

object nullobj = System.Reflection.Missing.Value;

Microsoft.Office.Interop.Word.Document doc = wordApp.Documents.Open(ref file,
ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,ref nullobj, ref nullobj, ref nullobj);

Microsoft.Office.Interop.Word.Document doc1 = wordApp.ActiveDocument;

string m_Content = doc1.Content.Text;

m_Textbox.Text = m_Content;

doc.Close(ref nullobj, ref nullobj, ref nullobj);

but i am not getting the success , its giving error like "No overload method 'open' takes 12 argument"

please tell me how can i solve this problem.

i want to show uploaded word file in Literal or Label


Answers (1)