Dim word As New Microsoft.Office.Interop.Word.Application Dim doc As Microsoft.Office.Interop.Word.Document Try doc = word.Documents.Open("C:\Users\Public\Documents\Search Engine Optimization.doc") ' word.WindowState = word.WdWindowState.wdWindowStateNormal ' word.Visible = True doc.ActiveWindow.Selection.SetRange(0, 2060) doc.ActiveWindow.Selection.Copy() Dim data As DataObject data = Clipboard.GetDataObject() RichTextBox1.Text = data.GetData(DataFormats.Text).ToString() ' doc.Range.InsertAfter("Text Added at " & TimeOfDay.ToShortDateString) Catch ex As COMException MessageBox.Show("Error accessing Word document.") End Try
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)