Quantcast
Channel: General Office Development forum
Viewing all articles
Browse latest Browse all 2257

Add Hyperlink to SmartArt

$
0
0

Hi

I created a SmartArt organization chart with vba. It works perfect.

If I right-click an item and select the "Hyperlink" Funktion, I can add a link-address.

But I can't figure out how to add the Hyperlink to my SmartArt with my vba-script.

I tried hunderds of variations and searched houres ;)

This is what I tried:

Dim MyNodes As SmartArtNodes
Set MyShp = ActiveWorkbook.ActiveSheet.Shapes("MyArt")
Set MyNodes = MyShp.SmartArt.Nodes

Dim shp1 As Shape
Set shp1 = MyNodes.Item(1).Shapes

ActiveWorkbook.Worksheets("Tabelle1").Hyperlinks.Add Anchor:=shp1, Address:="https://msdn.microsoft.com/"

This method works fine with normal Shapes but not with SmartArt.

Any ideas??

Thanks for your support ;)

Cheers


Viewing all articles
Browse latest Browse all 2257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>