设置为内容控件时,图像文件名会更改 [英] Image file name is changed when set to content control
问题描述
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屋!