Thread Tools Display Modes
  #1   Report Post  
Tyho Tyho is offline
Junior Member
Posts: 1
Exclamation 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"
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro question Connie Martin Microsoft Word Help 2 January 31st 08 04:24 PM
Macro question [email protected] Microsoft Word Help 2 September 17th 06 02:49 PM
Macro question TBoe Microsoft Word Help 4 April 13th 06 07:07 PM
Macro Question Tom Grassi New Users 2 September 15th 05 05:42 PM

All times are GMT +1. The time now is 06:12 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.

About Us

"It's about Microsoft Word"