![]() |
|
#2
|
|||
|
|||
|
Hi there,
I hope I have understood your question? Does the following code do what you want? Option Explicit Public Sub HyperlinkedPicture() Dim oInlineShape As Word.InlineShape Dim sFileFullName As String Dim oFileBrowse As FileDialog Set oFileBrowse = Application.FileDialog(msoFileDialogFilePicker) With oFileBrowse .Title = "Insert Picture" .AllowMultiSelect = False .ButtonName = "Insert and Hyperlink" .Filters.Clear .Filters.Add "Pictures", "*.jpg, *.jpeg, *.wmf, *.emf, *.gif" If .Show Then sFileFullName = .SelectedItems(1) Set oInlineShape = Selection.InlineShapes.AddPicture _ (FileName:=sFileFullName, LinkToFile:=True, SaveWithDocument:=False) ActiveDocument.Hyperlinks.Add Anchor:=oInlineShape.Range, _ Address:=sFileFullName End If End With Set oInlineShape = Nothing Set oFileBrowse = Nothing End Sub |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Hyperlink Text to an Image in Word
|
Franklin | Drawing and Graphics | 8 | 09-19-2015 02:14 PM |
| How do I add a hyperlink to an image? | sarahrb | PowerPoint | 1 | 08-26-2012 08:26 AM |
Putting an image with hyperlink to certain slides
|
spiffmonkey1 | PowerPoint | 1 | 07-17-2011 03:58 PM |
Adding Image into a excel cell and adding a hyperlink to the image
|
saravananiyyanar | Excel | 3 | 05-04-2011 08:31 AM |
| Outlook and folder hyperlink | RalphConnor | Outlook | 0 | 02-28-2011 12:23 PM |