Solved

How do I create a lightbox gallery in a Word document?

Posted on 2010-09-23
5
982 Views
Last Modified: 2012-05-10
Recently, I have found that screenshots I use in Word for knowledgebase articles are too large to fit the page and give a clear understanding to the reader for the purpose of the screenshot. Is there a way that Word will allow a user to dbl-click an image, and have a larger (or full-res) original pop up in a lightbox-esque window or frame?

I do not want to cause the machine to need to open a new program or otherwise hide the Word window behind another application.
0
Comment
Question by:metroacct
  • 3
  • 2
5 Comments
 
LVL 17

Accepted Solution

by:
wobbled earned 500 total points
ID: 33745470
The only way that you can do this would be via VBA.  I'd recommend that even though you say you do not want another program loading you will need something to act as a hosting application for showing the larger image.  You could do this by opening the image in Internet Explorer and hiding all the other bars etc.  This can be done in VBA relatively simply.

The other approach would be to convert your word documents into PDF's via Acrobat.  You will then be able to go into the PDF using the paid for version of Adobe Acrobat, you can then add image controls so that when you click on an image the image pops out at a larger size.
0
 

Author Comment

by:metroacct
ID: 33745817
I gave that some thought, because I really don't want the kb articles to be edited by others, and that would make revisioning simple.

Since I have Picasa installed on my PC, I used a "Same Frame" hyperlink target to the original, and that works the way I want, but I don't really want to mandate that Picasa is installed and that its the default app for pictures.

Since I'm not a scripter... How would a VBA work?
0
 

Author Closing Comment

by:metroacct
ID: 33746566
The reason that I didnt give an A was because I didnt want to force the use of any other software.
0
 
LVL 17

Expert Comment

by:wobbled
ID: 33746609
i'll find the code for you on the VBA side, I wrote something to do this a while back so will try to find it.  I would say that the acrobat pdf route is probably a better solution though as you can do so much with it including building search indexs on the file, which will really help on a KB and works as long as the user has adobe reader installed (which almost everyone does)
0
 
LVL 17

Expert Comment

by:wobbled
ID: 33752268
Here is the code I said about.

Firstly create a userform and put a web browser item control on it (from the extended list of items range)

The only thing on the form is your image (the larger one)

Public Sub ActivateGif()
    'Sets the Navigation Path
    myForm.Navigate2 "C:\my_file\my_big_picture.gif"
End Sub

Then I just control this form from a sub somewhere else in the code

Public Sub ControlPictureForm

.....

Dim objFrm as Object

 Set objFrm = New myForm
        objFrm.Show vbModeless
        objFrm.ActivateGif      'Set the Navigation path of WebBrowser
        objFrm.myForm.SetFocus
        objFrm.Repaint

........

I used to use the above to show an animated gif to give the impression of a file transfer process etc for the user, but it will work fine to expand out a picture.  You could tweak the code so that you just pass a different path to the ActiveGif sub.

Anyway hope it gives you some help

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I would like to show you some basics you can do with Mailings in MS Word. It´s quite handy feature you can use for creating envelopes, labels, personalized letters etc. First question could be what is this feature good for? Mailing can really he…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now