Я создал шаблон в Microsoft Publisher, в котором есть несколько «графических заполнителей». Я прочитал документацию, но не могу понять, как программно установить изображение моих заполнителей.
Private Sub Document_Open()
Dim shp As Shape
For Each shp In ActiveDocument.Pages(1).Shapes
If shp.AlternativeText = "Image1" Then
' I want to set the image here, something like shp.Image = "C:\blah.jpg"
Debug.Print ("Got to image 1")
ElseIf shp.AlternativeText = "Image2" Then
Debug.Print ("Got to image 2")
Else
End If
Next shp
End Sub