Closed Teccivil closed 1 month ago
前面连接代码省略,以下是我在指定段落添加图片的代码(parag是我获取的指定段落的Range):
img = parag.InlineShapes.AddPicture(img_path) img.Width = width img.Height = height
默认返回的是tuple,第一个是HRESULT
可以包装一下去掉这个,参考https://github.com/timxx/pywpsrpc/wiki/RpcProxy
谢谢大佬,通过这个方式解决了
前面连接代码省略,以下是我在指定段落添加图片的代码(parag是我获取的指定段落的Range):
img = parag.InlineShapes.AddPicture(img_path) img.Width = width img.Height = height