View Single Post
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default inserting picture in word and making it clickable to enlarge it

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.

--
Cheers
macropod
[Microsoft MVP - Word]


"AJN" wrote in message ...
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