View Single Post
  #4   Report Post  
sandeep424 sandeep424 is offline
Junior Member
 
Posts: 0
Default

Can SOmeOne explain me
Step 2: 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.

(i) What should I fill in "Pic 1 here" and "Pic2 Here"
(ii) What do you mean by insert the images in-line with test where indicated - Does it mean to insert my images anywhere where I want to?
(iii) WHich field should I select and press F9 - MACROFIELD
(iv) Does the code '{MACROBUTTON PicSize {IF{DOCPROPERTY PicSize}= Y "Pic1 Here" "Pic2 Here"}}' come under Sub MACROBUTTON() and End Sub. When I paste this under these two tags and run it it shows me compile errors?


I am sorry for asking these questions?.But Please help me understnad these details?

Sandeep

Quote:
Originally Posted by macropod[_2_] View Post
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