Word 2010 - 尝试从宏中打开“检查Accessiblity和属性”面板

时间:2015-09-03 18:55:58

标签: vba word-vba word-2010

我尝试录制打开"检查辅助功能"文件>信息>下的选项准备共享,但没有记录任何内容。我已经尝试了所有的Dialog show命令,但找不到任何会打开菜单。

我也尝试打开"显示文档面板",我也无法切换。

我怎么能用宏打开这些?我想用一个按钮设置工作区。

2 个答案:

答案 0 :(得分:0)

尝试

public static List<SearchResults> getMatchedHits(ScoreDoc[] hits, IndexSearcher searcher)
{
   List<SearchResults> list = new List<SearchResults>();
   SearchResults obj;
   try
     {
       for (int i = 0; i < hits.Count(); i++)
        {
          // get the document from index
          Document doc = searcher.Doc(hits[i].Doc);
          string strFirstName  = doc.Get("FirstName");
          string strLastName = doc.Get("LastName");
          string strDesigName = doc.Get("DesigName");
          string strAddres  = doc.Get("Addres");
          string strCategoryName = doc.Get("CategoryName");
          obj = new SearchResults();
          obj.FirstName = strFirstName;
          obj.LastName = strLastName;
          obj.DesigName= strDesigName;
          obj.Addres = strAddres;
          obj.CategoryName = strCategoryName;
          list.Add(obj);
       }
       return list;
    }
    catch (Exception ex)
    {
       return null; // or throw exception
     }
}

答案 1 :(得分:0)

试试这个。

Application.CommandBars(“辅助功能检查器”)。可见=真