Import a image as hyperlink in a Word document using Aspose.Words for .NET

It shows the url, but can’t work. Here’s my code:

Shape imageShape = new Shape(doc, ShapeType.Image);
imageShape.ImageData.SetImage(Server.MapPath("Temp") + "\icon_doc.gif");
imageShape.Width = 15;
imageShape.Height = 15;
imageShape.Target = "_blank";
imageShape.HRef = "";

Thanks a lot.

Thanks for inquiry. You should press Ctrl+Click to open link in browser.
Best regards.

I press Ctrl+Click … It’s not work until i Add the code :

imageShape.Inline = true;

Hello Lin.
It’s nice that you got right with this code. Please let us know what you would like to know or to request further. We’d be happy to help you.