Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-07-2014, 06:32 PM
pooklet pooklet is offline Macro to Unprotect password protected document Windows 7 64bit Macro to Unprotect password protected document Office 2013
Novice
Macro to Unprotect password protected document
 
Join Date: Dec 2014
Location: Melbourne, Australia
Posts: 2
pooklet is on a distinguished road
Default Macro to Unprotect password protected document

Hi There

I am having trouble getting a macro to work in Word 2013 to un protect a password protected document, then re protect. I get the error Argument not optional and have no idea what this means.

I eventually want the macro to unprotect the document, insert a row in a table then reprotect the document.

Can someone please help.


If ActiveDocument.ProtectionType <> wdNoProtection Then
>> ActiveDocument.Unprotect Password:="password1"
>> End If
>>
>> If ActiveDocument.ProtectionType = wdNoProtection Then
>> ActiveDocument.Protect _
>> Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="password1"
>> End If


End Sub


thanks so much Carol
Reply With Quote
 

Tags
macro, unprotect, word 2013

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Password protected file no longer offers password dialog on Open htaylor Word 0 10-15-2013 12:35 PM
How to open a password-protected word document? navalava Word 1 07-01-2012 12:15 PM
Macro to Unprotect password protected document Hyperlinks to password protected webpage john_ Outlook 2 07-28-2011 01:43 AM
Macro to Unprotect password protected document Oops password protected word !!! mistermouse Word 5 02-16-2011 01:56 PM
Password Protected Files gurp99 Word 0 08-17-2010 03:30 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05: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