码迷,mamicode.com
首页 > 其他好文 > 详细

word中替换被批注的正文的值

时间:2015-08-27 20:37:15      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:

 

word中替换被批注的正文的值

 

            try
            {
                Word.Document document = (Word.Document)dsoWord.ActiveDocument;
                foreach (Word.Comment var in document.Comments)
                {
                    var.Scope.Text = "替换被批注正文的值";

                    //var.Range.Text = textBox1.Text;//替换批注的值
                }
                document.Save();
            }
            catch (Exception)
            {
                MessageBox.Show(this, "替换值失败!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

word中替换被批注的正文的值

标签:

原文地址:http://www.cnblogs.com/taomylife/p/4764093.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!