Solved

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

Posted on 2010-09-23
5
993 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

919 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

21 Experts available now in Live!

Get 1:1 Help Now