Locking Header and/or Footer
i am new to vba programming, and i need a way to lock the header and/or footer in code after i insert some text into it (also in code).
What i have done is the following:
in the ThisDocument:
Private WithEvents wdApp As Word.Application
Private Sub Document_Open()
If wdApp Is Nothing Then
Set wdApp = ThisDocument.Application
Private Sub wdApp_WindowSelectionChange(ByVal Sel As Selection)
Select Case (Sel.StoryType)
Case wdEvenPagesHeaderStory, wdFirstPageHeaderStory, wdPrimaryHeaderStory
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
However it seems there nothing that happens, and i can edit the document header as usual. What should i do to prevent this?
I appreciate any help cause i am just a beginner.
Thanks i advance