创建源词doc的修改文件时,不链接样式和图像 [英] styles and images are not linked while creating a modified file of the source word doc

查看:123
本文介绍了创建源词doc的修改文件时,不链接样式和图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我打开了Word包,加载了主文档部分,并在段落标记中添加了一些属性,为段落文本提供了背景色。例如,

I have opened the Word package, loaded the main document part and added some properties in the paragraph tag to give a background colour to the paragraph text. for example,


For Each runtext As XElement In records

              runtext.AddFirst(<w:rPr>
                         <w:highlight w:val="yellow"/>
                       </w:rPr>)

            Next

推荐答案

您好Vikash,

Hi Vikash,

复制零件并重新包装后,解压缩原始docx文件,并根据具有相同名称的新.docx文件的内容检查单词/ _rels / document.xml.rels文件(不是.xml文件)的内容。

After you have copied the parts and repackaged them, unpackage your original docx file and check the contents of the word/_rels/document.xml.rels file (not a .xml file) against the contents of the new .docx file with the same name.

您的应用程序的替代解决方案是将原始文件复制到桌面。将其重命名为目标文件名,将其复制回原始路径。然后通过运行应用程序中的代码
修改重命名的.docx部分word / document.xml,然后保存所有并关闭所有部分而不尝试将所有部分复制到新文件。

An alternative solution for your application would be to copy the original to the desktop. Rename it to the intended file name, copy that back to the original path. Then modify the renamed .docx part word/document.xml by running the code in your application, but then save all and close all without trying to copy all of the parts to a new file.

 

 


这篇关于创建源词doc的修改文件时,不链接样式和图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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