Escaping from a text box

O

Oz Springs

I want to select all of a document, but if the cursor is in a text box, only
the text therein will be selected.

How can I get the cursor back into the main body of the document so I can
select all the text, including all anchored things like text boxes and
graphics?

Thanks for any help




Oz
 
J

Jean-Guy Marcil

Oz Springs was telling us:
Oz Springs nous racontait que :
I want to select all of a document, but if the cursor is in a text
box, only the text therein will be selected.

How can I get the cursor back into the main body of the document so I
can select all the text, including all anchored things like text
boxes and graphics?
This will do the trick:
'_______________________________________
Dim StartRange As Range

'To save user selection
Set StartRange = Selection.Range

ActiveDocument.Range(Start:=0, End:=0).Select
Selection.WholeStory

Selection.Copy

'reset user selection
StartRange.Select
'_______________________________________

But why don't you tell us what you are doing? It may not be necessary to
actually select the whole document...

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
O

Oz Springs

Jean-Guy

Thank you very much for this. I haven¹t checked it out yet, but shall do
shortly.

Kind regards



Oz
 

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