设置为内容控件时,图像文件名会更改 [英] Image file name is changed when set to content control

查看:74
本文介绍了设置为内容控件时,图像文件名会更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,


 


我使用以下代码将图像从文件设置为内​​容控件。但是,Word将文件名存储到媒体文件夹时更改文件名。出于某些原因,我需要知道Word中的文件名,或者在设置为内容控件时保留其原始名称。有没有
的任何方法?


 


 
control.Range.InlineShapes.AddPicture(strFilePath);

解决方案

嗨Vu,


我相信这样的事情可能适合你:



使用



 




wApp.Selection.Range.InlineShapes


.AddPicture(






" My Path" )。标题
=



" MyName"







 



结束








Hello All,

 

I use the following code to set an image from file to content control. However, Word changes the file name when stores it to media folder. For some reasons, I need to know the file name in Word or keep its original name when set to content control. Are there any ways to do this?

 

control.Range.InlineShapes.AddPicture(strFilePath);

解决方案

Hi Vu,

I believe something like this might work for you:

With

 

wApp.Selection.Range.InlineShapes

.AddPicture(

"My Path").Title =

"MyName"

 

End

With


这篇关于设置为内容控件时,图像文件名会更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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