Show Word document content in RichTextBox

Microsoft.Office.Interop.Word.Application application = new Microsoft.Office.Interop.Word.Application();

Document document = application.Documents.Open(@”C:\…”);

int count = document.Words.Count;

string text = “”;

for(int i = 1; i <= count; i++){

text += document.Words[i].Text;

}

richTextBox1.Text = text;

application.Quit();

Show and ShowDialog

  1. Show: shows in a non modal form, means that users can click on the parent form.
  2. ShowDialog: shows in modal form, means that users CANNOT click on the parent form.