inserting picture in word and making it clickable to enlarge it

A

AJN

I have inserted snall photos into word text document. I want a reader to be
able to click on the photo and see an enlarged version
 
M

macropod

Hi AJN,

Here's one way:

First: Create a custom document property named 'PicSize' as a Yes/No type.

Second: Insert a MACROBUTTON field, coded as:
{MACROBUTTON PicSize {IF{DOCPROPERTY PicSize}= Y "Pic1 Here" "Pic2 Here"}}
and insert the images in-line with text where indicated. It doesn't matter which is which. When you're done, select the field and
press F9 to update it.

Third: Add the following macro to the document:
Sub PicSize()
With ActiveDocument.CustomDocumentProperties("PicSize")
.Value = Not .Value
End With
With Selection
.Fields.Update
.Collapse
End With
End Sub

Now, whenever you double-click on the picture, Word will resize it.

Note: Both sets of field brace pairs (ie '{ }') for the MACROBUTTON field are created via Ctrl-F9 - you can't simply type them or
copy & paste them from this message. If you want, you can have multiple instances of the MACROBUTTON field with the same or
different pictures and each will behave the same way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top