Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-06-2012, 09:07 PM
macropod's Avatar
macropod macropod is offline Removing password protection Windows 7 64bit Removing password protection Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,513
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi,



That warning is part of how you have Word configured. It can be disabled temporarily, with the following code mods.

Starting with the end of the 'Dim' line, add the following:
Code:
, TrkStatus As Boolean
TrkStatus = Options.WarnBeforeSavingPrintingSendingMarkup
Options.WarnBeforeSavingPrintingSendingMarkup = False
then insert:
Code:
Options.WarnBeforeSavingPrintingSendingMarkup = TrkStatus
before:
Code:
Application.ScreenUpdating = True
This retains the current state of the documents, without changing their content. Simply changing the display to 'final' won't deactivate the messsage.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 03-07-2012, 05:47 AM
cure4glass cure4glass is offline Removing password protection Windows Vista Removing password protection Office 2007
Novice
 
Join Date: Feb 2012
Posts: 7
cure4glass is on a distinguished road
Default

Thanks Macropod for the quick response.Please forgive my lack of knowledge here,but I'm thinking I may have inserted the first bit of code you provided in the wrong spot
.Here's the code as I have it now:

Code:
Sub UnprotectDocuments()
Application.ScreenUpdating = False
Dim strFolder As String, strPwd As String, strFile As String, wdDoc As Document
strPwd = InputBox("What is the password?", "maude#1")
If strPwd = "" Then Exit Sub
strFolder = GetFolder
If strFolder = "" Then Exit Sub
strFile = Dir(strFolder & "\*.doc", vbNormal)
While strFile <> ""
  Set wdDoc = Documents.Open(FileName:=strFolder & "\" & strFile, AddToRecentFiles:=False, _
    Visible:=False, PasswordDocument:=strPwd, WritePasswordDocument:=strPwd)
  With wdDoc
    '.ReadOnlyRecommended = False
    .Password = vbNullString
    .WritePassword = vbNullString
    ,TrkStatus As Boolean
TrkStatus = Options.WarnBeforeSavingPrintingSendingMarkup
Options.WarnBeforeSavingPrintingSendingMarkup = False
    .Close SaveChanges:=True
  End With
  strFile = Dir()
Wend
Set wdDoc = Nothing
Options.WarnBeforeSavingPrintingSendingMarkup = TrkStatus
Application.ScreenUpdating = True
End Sub

Last edited by cure4glass; 03-07-2012 at 05:56 AM. Reason: typo
Reply With Quote
Reply

Tags
password, protection, remove



Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing password protection Did an auto-update remove password protection? namedujour Excel 0 11-22-2011 07:40 AM
Password Protection Problem todobfl Excel 4 07-26-2011 06:40 PM
Removing password protection Password Protection JimP Visio 2 03-24-2011 04:23 AM
Help reg Protection of cell. aligahk06 Excel 1 09-02-2009 05:45 PM
Visio - password protection icap5183 Visio 0 07-24-2009 06:00 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:23 PM.


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