Move event: Inlineshape object

T

Tom Aa. Johnsen

Hi

I have a scanned image of a signature which is inserted into a
document (InlineShape). This image shall not be possible to COPY OR
COT. I have made code which controls if a user tries to Copy
(EditCopy) or Cut (EditCut) the image. That was easy.

But now I would also like to make some code to prevent the user in
moving the image to another document (drag & drop). That means, I must
catch the MOVE-event of the image and stop the user before the image
is dragged into another document. I have been doing some tests with
the event WindowSelectionChange, but no success so far.

Is there anyone out there having a good solution for this problem? Any
suggestions?
 
F

fumei

I am not sure there IS a Move method for InlineShape. One posiibility is to
insert your image into an ActiveX mage control. While it is true that an
ActiveX control is a form of InlineShape, it does have other events you can
use.

Then you could simply put a explicit move of the selection point in the
Image_Click event. The user clicks the image to either copy or move it, and
the selection just....moves to a different location. Some thing like:

Sub Image1_Click()
Selection.Move Unit:=wdCharacter, Count:= -1
End Sub

Every time the user clicks on the image...the selection leaves and goes back
one character. You could of course move it where ever you you want, and
display a message saying no way Jose.
 

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