#1
|
|||
|
|||
Anyway to insert thumbnail opening to a larger picture
Hello all, I have tried to find a solution to my problem but all the responses seem to be very dated and seems not to be possible. Is there anyway I can insert a picture into my word document which would be a thumbnail but when you click on the thumbnail it will open to the full image? Thank you for your time. |
#2
|
||||
|
||||
What is your delivery mechanism for this functionality? Does it need to work in Word or are you saving to PDF or HTML where the functionality needs to be present. If it needs to work in Word then you will need macros enabled which is always problematic if you don't control the environment that the users will use.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
||||
|
||||
The following macro will insert a linked thumbnail image at the cursor, subject to the provisos mentioned by Andrew. Call it from a macro that provides the image path and optionally the screen tip text.
Code:
Sub InsThumbNail(strPath As String, _ Optional strTipText As String = "Link to full size image") 'Graham Mayor - http://www.gmayor.com - Last updated - 20 May 2018 Dim oShape As InlineShape Set oShape = Selection.InlineShapes.AddPicture(FileName:=strPath, _ LinkToFile:=False, _ SaveWithDocument:=True) With oShape .LockAspectRatio = msoTrue .Width = InchesToPoints(1) ActiveDocument.Hyperlinks.Add Anchor:=.Range, _ Address:=strPath, _ SubAddress:="", _ ScreenTip:=strTipText, _ TextToDisplay:=.Range.Text End With lbl_Exit: Set oShape = Nothing Exit Sub End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Picture content control -> insert picture -> empty? | Jaymond Flurrie | Word | 3 | 07-13-2016 07:00 AM |
How do I insert pictures directly into picture boxes by clicking the box instead of using INSERT>PIC | Bree | Word | 1 | 06-24-2016 10:32 PM |
Error message opening a document in Word "Word cannot open this file because it is larger than 512 M | poonamshedge | Word | 2 | 09-11-2014 06:11 AM |
"Insert Picture\Link to File..." embeds picture | sinz54 | Drawing and Graphics | 1 | 09-29-2013 06:31 PM |
Can i insert a thumbnail image, but expand it during my presentation? | deejaycruiser | PowerPoint | 1 | 11-10-2010 11:13 AM |