Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vba 检查PowerPoint’;自定义布局具有图片集_Vba_Powerpoint - Fatal编程技术网

Vba 检查PowerPoint’;自定义布局具有图片集

Vba 检查PowerPoint’;自定义布局具有图片集,vba,powerpoint,Vba,Powerpoint,我试图确定PowerPoint的自定义布局是否在背景中包含用户的图片。我正在寻找与此代码等效的代码: ActivePresentation.Designs(1).SlideMaster.CustomLayouts(1).Background.Fill.HasPicture 但显然CustomLayouts.Background.Fill没有类似于HasPicture的属性。我想知道是否有人知道这个问题的答案 这将告诉您它是否充满图片。我认为没有办法知道图片的原始名称,但是你可以使用.Fill.

我试图确定PowerPoint的自定义布局是否在背景中包含用户的图片。我正在寻找与此代码等效的代码:

ActivePresentation.Designs(1).SlideMaster.CustomLayouts(1).Background.Fill.HasPicture

但显然CustomLayouts.Background.Fill没有类似于HasPicture的属性。我想知道是否有人知道这个问题的答案

这将告诉您它是否充满图片。我认为没有办法知道图片的原始名称,但是你可以使用.Fill.UserPicture“图片文件的完整路径”强制它


我明白了,但我认为如果ActivePresentation.Designs(1.SlideMaster.CustomLayouts(1.Background.Fill.Type=6)应该是这样。或者=msoFillPicture。你完全正确。我道歉。我已经修改了我的答案以纠正错误。我选择使用6而不是msoFillPicture,因为如果有人在Office中使用的是来自VB而不是VBA的相同代码,则不会定义msoFillPicture。
If ActivePresentation.Designs(1).SlideMaster.CustomLayouts(1).Background.Fill.Type = 6 Then
  MsgBox "Layout 1 has a picture fill"
End If