Inserting Document Text

J

JBNewsGroup

Hi,

Is there a way to trap a "mouse click" event in a document? I want to
insert pre-defined text in a document at the point where the user "left
clicked" the mouse.

I hope that this explanation is explicit enough.

Jerry Bodoff
 
C

Charles Kenyon

The point in a document where the user left-clicks the mouse is the
selection. It is the insertion point.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
J

JBNewsGroup

Hi Charles,

Thanks for the simple answer. I will try it. I guess I was making it more
complicated that it really is.

Once again thanks.

Jerry Bodoff
 
J

JBNewsGroup

Hi Charles,

Thanks. I can put the text where the user "clicked". However, is there a
way to tell when the user "clicked" the mouse button . I seem to be missing
something. Do I need to create a class module to do this?

Jerry Bodoff
 
C

Charles Kenyon

Are you saying you want to run your macro whenever the user clicks the mouse
button? That sounds like a real resource hog and would annoy most users that
I know.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
J

JBNewsGroup

Hi Charles,

What I am trying to accomplish is a simplified system for drawing album
pages using Word's drawing capabilities. This is for users who only have
access to Word and wish to draw custom pages.

I have a custom toolbar that contains specific shape types and commands.
When a user clicks on a shape the OnAction procedure saves the type of shape
and displays a "dialog" that allows setting shape data: size, rotate, text,
etc.. The user "Accepts" or "Cancels" and the dialog is closed. At this
point I want to allow the user to click on a drawing grid location at which
to place the shape. Same process as using the drawing toolbar: select
shape, click on grid, insert shape; except I am inserting a dialog between
"select" and "click". When the shape is inserted I also put a textbox in
the shape and within that a one cell table so I can horizontally and
vertically center text.

It is the "click on grid" that I am having a problem with. I am open to any
and all suggestions including a better way of doing this.

Thanks for your help with this. The original post should have been more
explicit.

Jerry Bodoff
 
C

Charles Kenyon

OK. I don't know how to do this but someone else here may. To recap, what
you want is for your procedure to insert the shape according to the
parameters given in your userform. After this happens, and only after this
happens, you want to pick up the mouse click in the document to proceed
further with the remainder of your procedure. Hopefully, this will help
someone else who knows much more vba than do I to help you.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
J

JBNewsGroup

Hi Charles,

That is correct. Thanks for your help.

Once again thanks.

Jerry Bodoff

P.S. I'm surprised to see someone else up in the wee hours.
 

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