F
Fuzzhead
I was looking at other posts and found out how to protect my headers and
footers using the information in ‘How can I prevent users from editing the
header of a document in Word 2000 or higher?’ (See below). Can you use this
same idea to protect a table in my document? I have created a bookmark range
around the entire table that I don't want users to be able to change and
called it ‘bktbl’. How do you add a new Case that if a user clicks inside
‘bktbl’ it will go to right before the bookmark or how would you add a whole
new macro?
Private Sub wdApp_WindowSelectionChange(ByVal Sel As Selection)
'quit if active doc isn't attached to this template
If ActiveDocument.AttachedTemplate <> ThisDocument Then Exit Sub
'get out of the header/footer if we're in it
Select Case Sel.StoryType
Case wdEvenPagesFooterStory, wdEvenPagesHeaderStory, _
wdFirstPageFooterStory, wdFirstPageHeaderStory, _
wdPrimaryFooterStory, wdPrimaryHeaderStory
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
Exit Sub
Case Else
End Select
End Sub
Fuzzhead
footers using the information in ‘How can I prevent users from editing the
header of a document in Word 2000 or higher?’ (See below). Can you use this
same idea to protect a table in my document? I have created a bookmark range
around the entire table that I don't want users to be able to change and
called it ‘bktbl’. How do you add a new Case that if a user clicks inside
‘bktbl’ it will go to right before the bookmark or how would you add a whole
new macro?
Private Sub wdApp_WindowSelectionChange(ByVal Sel As Selection)
'quit if active doc isn't attached to this template
If ActiveDocument.AttachedTemplate <> ThisDocument Then Exit Sub
'get out of the header/footer if we're in it
Select Case Sel.StoryType
Case wdEvenPagesFooterStory, wdEvenPagesHeaderStory, _
wdFirstPageFooterStory, wdFirstPageHeaderStory, _
wdPrimaryFooterStory, wdPrimaryHeaderStory
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
Exit Sub
Case Else
End Select
End Sub
Fuzzhead