mouse click action

  • Thread starter Thread starter Victor Frome
  • Start date Start date
V

Victor Frome

What must I do to enable word to darken a circle or other symbol by only
clicking the mouse. By the same token, I would like to clear the circle if
the sysmbol is clicked again.
 
You maybe able to do something with a MacroButton Field

{ MACROBUTTON macroname { INCLUDEPICTURE "C:/Image.jpg" } }

Where C:/Image.jpg contains the symbol that you want to use and macroname is
the name of a macro that would be run when the uses clicks upon the image.

You would need to have a series of images with different intensities of the
colour that you want to use saved with names like

Image1, Image2, Image3, up to Image 10

With the colour intensity increasing from 1 to 10

Then I would have the following code in the macro

Dim i As Long
Dim newimage As String
i = System.PrivateProfileString("C:\Image.txt", "ImageIndex", Index)
If i = "" Then
i = 1
ElseIf i = 10 Then
i = 1
Else
i = i + 1
End If
System.PrivateProfileString("C:\Image.txt", "ImageIndex", Index) = i
newimage = "Image" & i & ".jpg"
WordBasic.CopyFileA FileName:="c:\" & newimage, Directory:="C:\image.jpg"
ActiveDocument.Range.Fields.Update

With such an arrangement, each time that the user double clicked on the
symbol, the next higher image# file would be copied over the existing image
file and by the updating of the fields in the document, it would then be
displayed. The code above is set up for 10 stages of image colour intensity
after which it then goes back and starts at the beginning. If you want less
than 10 change the ElseIf i = 10 to whatever number that you want to use.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
Thanks for the suggestion. I thought it is just an option you have in Word
2003 or 2007. I have users throughout our community that use various version
of Word. I think there is a solution in Word 2003 but I could not find it in
2007 versions.
 
Back
Top