Archive for Giugno 25th, 2008

how to Read text from a word document using C#

CodeKeep C# Feed Giugno 25th, 2008

Description: how to Read text from a word document using C#

Link: http://www.codekeep.net/snippets/42920bef-805c-4321-940b-26c9eb059de9.aspx

1>click Add reference to ur project select 'com' add reference for microsoftword
note: The name of your assemblies will vary based upon the version of Word that you have - in my case, it is version 11, or "Microsoft Word 11.0 Object Library." 
2>For C# windows Application
-----------------------------

add namespace:  using Word;

Code to get text from doc to textbox
-------------------------------------
            openFileDialog1.ShowDialog();
            string path = openFileDialog1.FileName.ToString();
            Word.ApplicationClass wordApp = new ApplicationClass();
            object file = path;
            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, ref nullobj, ref nullobj, ref nullobj, ref nullobj);
            doc.ActiveWindow.Selection.WholeStory();
            doc.ActiveWindow.Selection.Copy();
            IDataObject data = Clipboard.GetDataObject();
            txtload.Text = data.GetData(DataFormats.Text).ToString();

Implement Drag and Drop in Your Web Apps: Part 2

WebReference News Giugno 25th, 2008

Last time we looked at how to use the dnd module. This week, we look at how it's implemented. Like all GWT modules, our drag-and-drop module has an XML configuration file. It also has some Java classes and interfaces. David Geary and Rob Gordon. 0505