M
MT DOJ Help Desk
Word 2000
I have a document where I need to control what happens when the users pastes
a block of text into the document. Currently, I have a macro assigned to a
special toolbar button. This works fine, but if the user forgets to use the
toolbar button, things get more complicated. My macros are designed so that
they will try to handle things correctly if the user does NOT paste data
into the document using the toolbar button, but there's just no way to
predict all the things that may go wrong in that scenario.
I've been thinking that if I can make the macros run every time something is
pasted into the document, no matter what method is used to paste the data,
that my problems would be solved. So I started thinking of an "on event"
macro that would run each time something is pasted into the document. The
problem is that this on-event macro would need to work in only one specific
document. For example, if the user has 3 documents open, the on-event paste
macro would need to run in only one document, and pasting in the other two
documents would need to work normally.
Is there any way to setup an on-event macro for pasting so that it works in
only one document (as opposed to Word in general)?
I have a document where I need to control what happens when the users pastes
a block of text into the document. Currently, I have a macro assigned to a
special toolbar button. This works fine, but if the user forgets to use the
toolbar button, things get more complicated. My macros are designed so that
they will try to handle things correctly if the user does NOT paste data
into the document using the toolbar button, but there's just no way to
predict all the things that may go wrong in that scenario.
I've been thinking that if I can make the macros run every time something is
pasted into the document, no matter what method is used to paste the data,
that my problems would be solved. So I started thinking of an "on event"
macro that would run each time something is pasted into the document. The
problem is that this on-event macro would need to work in only one specific
document. For example, if the user has 3 documents open, the on-event paste
macro would need to run in only one document, and pasting in the other two
documents would need to work normally.
Is there any way to setup an on-event macro for pasting so that it works in
only one document (as opposed to Word in general)?