Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-09-2013, 12:26 AM
czsti czsti is offline Protect header/ footer Windows 7 32bit Protect header/ footer Office 2010 32bit
Novice
Protect header/ footer
 
Join Date: Aug 2013
Posts: 6
czsti is on a distinguished road
Default Protect header/ footer

Hi,
i want protect (lock) my document header/footer for disable editing text in these.


I tried this code but with error code.

Code:
 
Private Sub Document_Open()
    Dim i As Long
    For i = 1 To ActiveDocument.Sections.Count
        ActiveDocument.Sections(i).Headers(wdHeaderFooterPrimary).Range.Locks = True
        ActiveDocument.Sections(i).Footers(wdHeaderFooterPrimary).Range.Locks = True
    Next
End Sub
Somebody help me? Thx
Reply With Quote
 

Tags
header, lock, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Protect header/ footer Header and Footer Questions Cmiller Word 5 08-20-2012 07:33 PM
Protect header/ footer header & footer avi_sai Word 1 12-03-2011 10:52 AM
Protect header/ footer Header & Footer Question - Help Need! Valentino.R Word 9 11-29-2010 08:23 AM
Different Header but same Footer Karthick Word 1 11-12-2010 09:08 AM
Header and footer questions boutells Word 0 07-21-2009 01:57 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:37 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft