Quantcast
Channel: Word for Developers forum
Viewing all articles
Browse latest Browse all 4350

Hyperlink to picture (Microsoft.Office.Interop.Word)

$
0
0
  1. add picture in ms Word:

      application.Selection.InlineShapes.AddPicture("D:\\WORK\\2.png", ref link, ref save, ref range);

 2. add hyperlink

            object missObj = Missing.Value;
            object displayText = "ANY TEXT";
            object oAddress = "MY HYPERLINK";
            object oRange = application.Selection.Range;
            application.Selection.Hyperlinks.Add(oRange, ref oAddress, ref missObj, ref missObj, ref displayText , ref missObj);

ok. now i have 1 picture and 1 hyperlink after picture ("ANY TEXT")
but i need hyperlink in my picture (if i move my cursor on my picture, i see this text)
how to connect it?
please write explanation WITH code lines


Viewing all articles
Browse latest Browse all 4350

Trending Articles



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