Referencing the Task Pane in Word 2003 using VBA

T

Terese B.

We have several protected documents in Word 2003 where the basic frame of the
document is protected for standarization (header and certain ask/fill-in
fields). The default for these protected documents has the editable regions
highlight turned on. It's been requested that we have an way to turn off this
highlighting with one button click, as opposed to showing the task pane,
switching to the Protect Document pane and then unchecking the box. I'm
having trouble writing the macro to make this happen and the macro recorder
doesn't record actions within the task pane except to close it. Any
suggestions would be greatly appreciated!

Also, if it's not possible to do this with a macro, is there a way to
default this highlight option to false?
 
J

Jean-Guy Marcil

Terese B. said:
We have several protected documents in Word 2003 where the basic frame of the
document is protected for standarization (header and certain ask/fill-in
fields). The default for these protected documents has the editable regions
highlight turned on. It's been requested that we have an way to turn off this
highlighting with one button click, as opposed to showing the task pane,
switching to the Protect Document pane and then unchecking the box. I'm
having trouble writing the macro to make this happen and the macro recorder
doesn't record actions within the task pane except to close it. Any
suggestions would be greatly appreciated!

Also, if it's not possible to do this with a macro, is there a way to
default this highlight option to false?


Here is the code to toggle that particular type of shading:


With ActiveDocument.ActiveWindow.View
If .ShadeEditableRanges = 0 Then
.ShadeEditableRanges = 65535
Else
.ShadeEditableRanges = 0
End If
End With


Just assign this code to a button and the button will act as a toggle
without the need to display the Task "Pain".
 

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