Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 08-14-2013, 10:49 AM
cosmopolitan cosmopolitan is offline Protect header/ footer Windows Vista Protect header/ footer Office 2007
Novice
 
Join Date: Aug 2013
Posts: 2
cosmopolitan is on a distinguished road
Default

Hello,

I found a thread for what you are trying to do that might help you. Hope it works!

http://www.access-programmers.co.uk/...d.php?p=956124
Reply With Quote
Reply

Tags
header, lock, vba

Thread Tools
Display Modes


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:07 PM.


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