如何在MS word中为Auto Numbers添加书签 [英] How to bookmark Auto Numbers in MS word

查看:146
本文介绍了如何在MS word中为Auto Numbers添加书签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过c#代码将MS字中的自动数字加入书签。当我将其加入书签时,它不会突出显示数字。

I am trying to bookmark the auto numbers in MS word through c# code.When i bookmark it, it is not highlighting the numbers.

我手动检查了它,它是不是有人告诉我为什么会这样发生

I checked manually also, it is not working.Can somebody tell me why it is happening like this

推荐答案

你好,

我们可以使用  Paragraph.SelectNumber Method(Word ) 选择列表中的数字或项目符号,然后添加书签。
根据我的测试结果,该方法可以为自动编号添加书签,但选择时数字不会突出显示。

We could use Paragraph.SelectNumber Method (Word) to select the number or bullet in a list and then add a bookmark. According to my test result, the method could add bookmarks to the autonumber, but the number is not highlighting when selecting.

这是VBA代码:

Dim a As ListParagraphs
Set a = ActiveDocument.ListParagraphs
a.Item(2).SelectNumber
Dim b As Bookmark
Set b = ActiveDocument.Bookmarks.Add("a", Selection.Range)
b.Select

结果与手动添加和选择书签相同。我认为这是设计的。

The result is same as adding and selecting the bookmark manually. I think it is by design.

问候,

Celeste


这篇关于如何在MS word中为Auto Numbers添加书签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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