OPEN XML将自定义不可见数据添加到段落/表 [英] OPEN XML add custom not visible data to paragraph/table
问题描述
有没有一种方法可以存储段落的其他数据,在用户打开并将其保存在MS Word中之后,该数据将保留下来.
Is there a way to store additional data for a paragraph, that would be persisted after user opens and saves a document in MS Word.
为此,我一直在使用CusotmXML,但事实证明,由于MS-Word从文档结构中剥离了所有CusotmXML元素,因此无法使用记录器.
Ive been using CusotmXML for this, but it turns out that this is no logner possible due to the fact that MS-Word strips all CusotmXML elements from the document structure.
每个单段或表格都有一个ID,我想配对"到我的数据源. 因此,稍后当我再次阅读docx时,我可以确定文档中每个未更改的段落/表的来源.
Every single paragraph or a table has an ID that I would like to "pair back" to my data-source. So later when I read the docx again I can identify origins of every unchanged paragraph/table in the document.
推荐答案
一种可能是插入SET字段.这将在文档中创建一个书签,您可以向其分配信息.但是,无法保护它免受用户删除. DATA字段也有可能.
A possibility would be to insert a SET field. This creates a bookmark in the document to which you can assign information. There's no way to protect it from the user removing it, however. A DATA field might also be a possibility.
与消失"(我相信这等同于隐藏"字体格式)不同,如果用户习惯于显示非打印信息,则该信息将不会显示.但是,如果用户打开域代码(Alt + F9),它将显示.
Unlike "vanish" (which I believe is equivalent to "hidden" font format) the information would not display if the user is in the habit of displaying non-printing information. It will display, however, if the user toggles on field codes (Alt+F9).
这篇关于OPEN XML将自定义不可见数据添加到段落/表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!