Tell me how in richTextBox to display the contents of files with the extension doc and docx? With txt files, everything is fine, but when opening doc, krakozyabry, like PK, will come out. The task is that there is a task to write a program for keeping a diary. Accordingly, it is necessary to make it possible to open already saved records with all the contents: text formatting, pictures, and so on. I want to display all this content, respectively, in a richTextBox.
private void открытьToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog o = new OpenFileDialog(); o.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*|*.doc|"; if (o.ShowDialog() == DialogResult.OK) { richTextBox1.Text = File.ReadAllText(o.FileName, Encoding.Default); } }