Word VSTO - Why paraId is sometimes missing

旧城冷巷雨未停 提交于 2019-12-02 12:15:54

From the Word Language Reference for Paragraph.ID:

Returns or sets the identifying label for the specified object when the current document is saved as a Web page.

Since the document is not saved as HTML the property has no meaning.

The ParaId property is not exposed for developers to use. It's not visible in the VBA object model, but due to the way the PIA (primary interop assemblies) are generated the .NET developer will see it. From the language reference:

Reserved for internal use.

Not sure what it is you're really trying to do, but you can use Word's Range.Find capability to search formatting (styles).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!