'remember' Selected text

M

Moishy

How can a macro be set to 'remember' the selected text, and later be
able to select that same text?
 
S

Stefan Blom

Well, you can store the text in a variable. But what is the best
approach depends on what you are trying to achieve, of course.

Stefan Blom
Microsoft Word MVP
 
M

Moishy

Well, you can store the text in a variable. But what is the best
approach depends on what you are trying to achieve, of course.

Stefan Blom
Microsoft Word MVP

I must insure that part of a document was not edited in the current
session. On open select some text (it may be different in each
session) and on close check if it has changed, if not select it, if it
has changed display a msgbox.
 
S

Stefan Blom

Moishy explained on 5/16/2012 :
I must insure that part of a document was not edited in the current
session. On open select some text (it may be different in each
session) and on close check if it has changed, if not select it, if it
has changed display a msgbox.


If you are only comparing text, storing it in a variable should do the
trick. However, note that you can use *document protection* to prevent
undesired editing to text, which may be a better option.
 
M

Moishy

Moishy explained on 5/16/2012 :




If you are only comparing text, storing it in a variable should do the
trick. However, note that you can use *document protection* to prevent
undesired editing to text, which may be a better option.

Thank you.
 

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