且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在word文档中插入具有映射到xml的内容控件的图像

更新时间:2023-11-07 12:24:46

您好mac73,

Hi mac73,

感谢您的提问。

由于您已获得SdtBlock元素,要将图像插入这些内容控件,我建议您使用Productivity Tool按以下步骤查看示例代码:

Since you have got the SdtBlock element, to insert the images into those content controls, I suggest you using the Productivity Tool to see the sample code by the following steps:

1.     创建包含图片内容控件的docx文档并保存,例如"source.docx"。

1.      Create a docx document with an image content control and save it, such as “source.docx”.

2.     将图像添加到docx的内容控件中并将其另存为"target.docx"。

2.      Add an image to the content control to the docx and save it as “target.docx”.

3.     打开工具;点击"比较文件"比较'source.docx”和"target.docx”文件。

3.      Open the Tool; click "Compare Files" to compare the “source.docx” and “target.docx” files.

4.     在"文件比较"中选项卡,单击"查看包裹代码"以查看有关如何将图像添加到内容控件的完整示例代码。

4.      In the "File Comparison" tab, click "View Package Code" to see the complete sample code on how to add an image to the content control.

我不确定它是否符合您的要求。如果没有,您能否详细描述您的要求或情景?如果您有任何疑问,请告诉我。

I'm not sure if it meets your requirement. If not, could you describe your requirement or scenario in detail? If you have any question, please let me know.

谢谢,

Lu