开发者

How to copy a header with picture from one docx to an other docx

I want to copy one header from a Word docx (opensml) to another Word docx.

I do it like this. http://msdn.microsoft.co开发者_JAVA技巧m/en-us/library/cc546917.aspx

but the problem is that I have a picture in my header. Does anybody know how to get the pic copied too?


Basically you have to copy the header's relationships part, and the binary image part itself.

If the rel id doesn't change, that's all you need to do. If it does change, you'll need to update the relId in the picture XML in the header itself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜