2017-01-25 218 views
0

我想在word文档上编辑插入的图片(c & p)。 所以我有这个使用c#interop在word文档中编辑插入的图片

chart.CopyPicture();            
bookmark.Range.Paste(); 

把它从我的Excel文件复制并粘贴到我的Word文件。但现在我必须在我的文字文件上进行编辑。 我该如何找到它?

+0

要更清楚一些: 在PPT中我能够做类似 shape = something.Paste();因为粘贴()或粘贴特殊()返回一个形状,但它不是在字。它的言辞无效。 所以shape = bookmark.Range.Paste()是不可能的。 – RedDot

回答

0

如果你想改变形状,使用How to change the size of a picture after inserting it into a word document

shape.Width = 150; 
shape.Height = 150; 
+0

但是,我怎样才能找到我的照片或将其分配给一个形状? 在你的链接上,他在形状上使用AddPicture(),但你不能做像 shape.AddPicture(... Paste(),...)或粘贴(shape.range)或类似的东西。 – RedDot

+0

您可以在粘贴之前尝试调整框架的大小。 http://stackoverflow.com/questions/9666624/position-scale-image-after-programmatically-pasting-it-into-bookmark-range –

+0

我的书签不放在框架内。 – RedDot

相关问题