Replace the value of the annotated text in word

            try
            {
                Word.Document document = (Word.Document) dsoWord.ActiveDocument;
                foreach (Word.Comment var in document.Comments)
                {
                    var.Scope.Text = "Replace the value of the annotated body";

                    //var.Range.Text = textBox1.Text; // Replace the comment value
                }
                document.Save ();
            }
            catch (Exception)
            {
                MessageBox.Show (this, "Replacement value failed!", "Error", MessageBoxButtons. OK, MessageBoxIcon.Error);
            }
       

 

Published 28 original articles · Like 15 · Visits 110,000+

Guess you like

Origin blog.csdn.net/z3h0a5n8g8x9i9a2o3/article/details/9032165