Solved

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

Posted on 2010-09-23
5
1,015 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There is a feature provided by MS Word that lets you create an Table of Contents for your Word document automatically. To use this feature for other documents there are two steps involved,   1.  Prepare your document for a table of contents (he…
Microsoft Word is a program we have all encountered at some point, but very few of us have dug deep into its full scope of features, let alone customized it to suit our needs. Luckily making the ribbon (aka toolbar, first introduced in Word 2007) wo…
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.

785 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