c# - Microsoft.Office.Interop.Word how to stop the file opening -


i have bunch of word documents want read , text value in string.i trying to microsoft.office.interop.word code looking similar one:

var wordapp = new word.application(); object file = filename; object nullobj = system.reflection.missing.value; 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); doc.activewindow.selection.wholestory(); doc.activewindow.selection.copy(); idataobject data = clipboard.getdataobject(); doc.close(); 

and @ the: word.document doc = wordapp.documents.open line prompts me opening file(with few options including:"open read copy" etc.) code works fine me besides fact opens document.is there way content without opening it? want object have data loaded inside of don't want open document.

if still itnerested - found answer in thread : disabling prompt while reading .doc file


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -