Home |
Search |
Today's Posts |
|
#1
|
|||
|
|||
A many asked Question about Macro
The Question is to Unprotect/hide/protect with a macro.
I already searched on the internet and try almost everything i saw.. Nothing happend. This is my code: Sub OntruimingWeg() ' If document is protected, Unprotect it. If ActiveDocument.ProtectionType wdNoProtection Then ActiveDocument.Unprotect Password:="password" End If ActiveDocument.Bookmarks("Bookmarksname").Range.Fo nt.Hidden = True ' ReProtect the document. If ActiveDocument.ProtectionType = wdNoProtection Then ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="password" End If End Sub again i tryed many more codes but nothing seems to work. pls kan someone help me out? Edit: I forgot to tell this macro is switched by an selection box. When it's on it's the code shown above. When it's off, its all the same exept "Range.Font.Hidden = False" |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro question | Microsoft Word Help | |||
Macro question | Microsoft Word Help | |||
Macro question | Microsoft Word Help | |||
Macro Question | New Users |