添加注释后无法查找文本 [英] Cannot Find Text after a Comment is Added

查看:74
本文介绍了添加注释后无法查找文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于报道的问题
here
: 


我仍然得到这种行为
with Microsoft Office Professional Plus 2010 Version 14.0 .7116.5000和Visual Studio 2012。


在某些版本/ SP中修复了这个问题吗?



谢谢,


Yoel

解决方案

你好Yoel,


基于我在VS2010中使用word 2013和VS2013与office 2013的测试,两者都可以正常工作。 (我在"starain"中添加了评论,然后找到"starain hello")


这是我的代码如下:

 public void SelectionFind(string t)
{
object findText = t;

Application.Selection.Find.ClearFormatting();

if(Application.Selection.Find.Execute(ref findText,
ref missing,ref missing,ref missing,ref missing,ref missing,ref missing,
ref missing, ref遗失,ref遗失,ref遗失,ref遗失,ref缺失,
ref遗失,ref遗失))
{
MessageBox.Show(" Text found。");
}
其他
{
MessageBox.Show(&"无法找到文字。");
}
}

我建议您参考我的代码进行测试并检查结果。


如果您仍有这个问题,请在OneDrive上分享您的项目。


最好的问候


Starain


Regarding the issue reported here

I'm still getting this behavior with Microsoft Office Professional Plus 2010 Version 14.0.7116.5000 , and Visual Studio 2012.

Was this fixed in some version/SP?

Thanks,

Yoel

解决方案

Hi Yoel,

Base on my test in VS2010 with word 2013 and VS2013 with office 2013, both of them work fine. (I added a comment to "starain", then find "starain hello")

This is my code below:

  public void SelectionFind(string t)
        {
            object findText = t;

            Application.Selection.Find.ClearFormatting();

            if (Application.Selection.Find.Execute(ref findText,
                ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,
                ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,
                ref missing, ref missing))
            {
                MessageBox.Show("Text found.");
            }
            else
            {
                MessageBox.Show("The text could not be located.");
            }
        }

I suggest that you could refer to my code to test it and check the result.

If you still have that issue, please share your project on the OneDrive.

Best Regards

Starain


这篇关于添加注释后无法查找文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆