Solved

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

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When creating Microsoft Word-based forms there may be a need to have a form field repeated throughout the whole document. For instance, with a company name, you may want this information repeated automatically throughout the document rather than man…
Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

821 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