Today, we will be using Microsoft Word to accomplish our task.
The Question arises, how to Integrate Word Application into your own application…
Steps:
1 => Add a Reference to Microsoft Word Object Library

2 => Import the Namespace and Classes
Imports Microsoft.Office.Interop
3 => Now Opening a Word Document using VB.Net
‘VB.Net Opens a Word Application in the Background which is not visible
Dim WordApp As New Word.Application
WordApp.Documents.Open(“”D:\Test.docx”, False, False, False, "", "", False, "", "", Word.WdOpenFormat.wdOpenFormatAuto)
4 => Closing the Word Document
WordApp.Quit()
5 => Copying the Contents of the Word File
WordApp.ActiveWindow.Selection.WholeStory() ‘Selects the complete document
WordApp.ActiveWindow.Selection.Copy() ‘Copies the document to Clipboard
‘Copies the clipboard data to IDataObject and then displays it on the RichTextBox.
Dim data As IDataObject = Clipboard.GetDataObject
txtResume.Text = data.GetData(DataFormats.Text).ToString
6 => Gr8, we are done with it :)
Pls post in your comments..
