![]() |
|
#1
|
|||
|
|||
![]()
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 |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
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 |
![]() |
spiffmonkey1 | PowerPoint | 1 | 07-17-2011 03:58 PM |
![]() |
saravananiyyanar | Excel | 3 | 05-04-2011 08:31 AM |
Outlook and folder hyperlink | RalphConnor | Outlook | 0 | 02-28-2011 12:23 PM |