SmartArt グラフィックには、「ノード」に関連付けられた画像を含めることができます (ただし、これは特定の SmartArt テンプレートでのみ使用されます)。VBA/VSTO オートメーションを使用してノードのテキストを設定する方法は知っていますが、画像を設定する方法がわかりません。
それはできますか?
SmartArt グラフィックには、「ノード」に関連付けられた画像を含めることができます (ただし、これは特定の SmartArt テンプレートでのみ使用されます)。VBA/VSTO オートメーションを使用してノードのテキストを設定する方法は知っていますが、画像を設定する方法がわかりません。
それはできますか?
このようなことを試してみてください。smartart を使用して VBA で何らかの作業を行ったことがあれば、これは理にかなっています。
Dim oSALayout As SmartArtLayout
Dim QNode As SmartArtNode
Dim oShp As Shape
Set oSALayout = Application.SmartArtLayouts(91) 'reference to organization chart
Set oShp = Chart.Shapes.AddSmartArt(oSALayout, ileft, 2, iWidth, iHeight)
Set QNode = oShp.SmartArt.AllNodes.Add
...
' note that there may be more than one shape associated with each node, I found that those org chart/smart art layouts with a specific "picture box" typically use Shapes.Item(2)
With QNode.Shapes.Item(1).Fill
.Visible = msoTrue
.UserPicture "c:\somepath\picture.jpg"
.TextureTile = msoFalse
End With
それが理にかなっていることを願っています!