如何添加.到Word中书签的名称
因此,我正在使用Word创建模板,以使用Java中的XDocReport生成.pdf.我遇到的问题是,当我在Word中向图像添加书签时,允许的名称不能包含.". ,例如,我无法命名书签estimate2.Photo,这是将变量正确映射到要传递的虚拟对象所需的名称.我的问题是以下内容,有什么办法可以更改此默认Word行为,以便它允许我添加包含特殊字符(如")的书签. ?
So i am using Word to create a template for the generation of a .pdf using XDocReport in Java. The problem i have encountered is that when i add a bookmark to an image in Word the allowed names cannot contain "." , for example i cannot name the bookmark estimate2.Photo , which is the name needed to correctly map the variable to the virtual object being passed. My question is the following, is there any way i can alter this default Word behaviour in order for it to allow me to add bookmarks that contain special characters like "." ?
我找到了一种通过修改配置.xml文件来重新连接此默认行为的方法.为了访问书签文件,请按照下列步骤操作:
I have found a way to rewire this default behaviour by modifying the configuration .xml files. In order to access the bookmarks file follow these steps:
- 转到.docx文件,右键单击该文件,转到7zip,然后将其作为存档打开.
- 访问word文件夹,您将在其中找到document.xml文件.
- 提取
- 使用记事本或任何其他文本编辑器打开,找到包含name属性的书签开始xml标记并对其进行修改.
- 修改文件后,将其拖回存档中并保存.