How to password protect a folder in Microsoft Office 2003

Anonymous
2011-08-13T15:11:18+00:00

I need to  password protect an entire "FOLDER in Microsoft Office 2003. I am also on a network, using a Buffallo drive, back up system, trash flies adn want to make sure all content filex in this folder as password protected etc.  I am using Windows XP 5.1.

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2011-08-14T09:35:24+00:00

Office 2003 has no facility to password protect folders. You can individually password protect the files in the folders; and through the operating system restrict access to the folders.

If your Buffalo drive is a NAS drive in addition you can probably restrict who accesses that drive also, through the NAS file sharing.

To protect the files in the folder, run the following macro on the folder and don't forget the password!!! or you won't be able to open them again! http://www.gmayor.com/installing_macro.htm

Public Sub PasswordAll()

Dim strFileName As String

Dim sPassword As String

Dim bPassword As String

Dim strPath As String

Dim oDoc As Document

Dim bBack As Boolean

Dim Response As Long

Dim fDialog As FileDialog

Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)

With fDialog

    .Title = "Select the folder containing the documents to protect and click OK"

    .AllowMultiSelect = False

    .InitialView = msoFileDialogViewList

    If .Show <> -1 Then

        MsgBox "Cancelled By User", , "Add Password To All"

        Exit Sub

    End If

    strPath = fDialog.SelectedItems.Item(1)

    If Right(strPath, 1) <> "" Then strPath = strPath + ""

End With

OpenPass:

sPassword = InputBox("Enter the Password", "Password to Open")

bPassword = InputBox("Re-enter Password", "Password to Open")

If sPassword <> bPassword Then

    MsgBox "The password and check do not match", _

    vbCritical, "Password Error!"

    GoTo OpenPass

End If

On Error Resume Next

Documents.Close SaveChanges:=wdPromptToSaveChanges

bBack = Options.CreateBackup

Options.CreateBackup = False

strFileName = Dir$(strPath & "*.doc")

While strFileName <> ""

        WordBasic.DisableAutoMacros 1

        Set oDoc = Documents.Open(strPath & strFileName)

        With oDoc

        .Password = sPassword

        .SaveAs .FullName, AddtoRecentFiles:=False

        .Close SaveChanges:=wdDoNotSaveChanges

    End With

    strFileName = Dir$()

    WordBasic.DisableAutoMacros 0

Wend

Options.CreateBackup = bBack

End Sub

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2011-08-14T08:23:33+00:00

    What folder are you referring to? Is it the folder where Office files are saved or the Folder in which Office installation files are stored.

    Provide more information on the issue so that we can halp you in better way.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments