如何添加.到Word中书签的名称 [英] How to add . to a name of a bookmark in Word

查看:268
本文介绍了如何添加.到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:

  1. 转到.docx文件,右键单击该文件,转到7zip,然后将其作为存档打开.
  2. 访问word文件夹,您将在其中找到document.xml文件.
  3. 提取
  4. 使用记事本或任何其他文本编辑器打开,找到包含name属性的书签​​开始xml标记并对其进行修改.
  5. 修改文件后,将其拖回存档中并保存.

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

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