Selecting adjecent text in Word 2003 from code

H

Hans Karlsen

I need to protect adjecent areas of my document from code. And as I
understand it I must select the areas that I want to keep un-protected
and protect the rest. But I cannot figure out how to set up adjecent
select from code.

From inside Word I just press CTRL and click - fine, but how to do the
same from code?

It seems impossible to get a macro to perform adjecent selects as
well.

TIA.
Hans Karlsen
 
H

Hans Karlsen

Found the solution to the problem, it turns out that I dont have to do
multiple selects but rather add Editors to selections or ranges...

Selection.Editors.Add wdEditorCurrent
ActiveDocument.Protect Password:="x", NoReset:=False, Type:= _
wdAllowOnlyReading, UseIRM:=False, EnforceStyleLock:=False
 

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