• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1139
  • Last Modified:

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

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
metroacct
Asked:
metroacct
  • 3
  • 2
1 Solution
 
wobbledCommented:
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
 
metroacctAuthor Commented:
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
 
metroacctAuthor Commented:
The reason that I didnt give an A was because I didnt want to force the use of any other software.
0
 
wobbledCommented:
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
 
wobbledCommented:
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now