How do I obfuscate a project file?

Instructions for Advanced Users Only

If you're comfortable importing and running macros in Microsoft Project, run the code at the bottom of this page on a copy of your project file.

Detailed Instructions

  1. Right click HERE and choose "Save Target As" or "Save Link As" to download and save the source code as "obfuscate.bas".
  2. Important: Make a copy of the Microsoft Project file that you wish to copy. The obfuscator will overwrite critical information in the file, so you don't want to run it on your master copy.
  3. Open the copy you made of the project file.
  4. In Project: Views → Macros → Visual Basic Editor. (NOTE: In versions of Project prior to 2013, it'll be in Tools → Macros)
  5. File → Import File
  6. Select the obfuscate.bas file that you downloaded and click Open. A new Module Folder and new module will be added in the pane on the left.
  7. Open the new module by double-clicking on it. You should see the source code to the obfuscator.
  8. Run the code by selecting Run → Sub/UserForm from the menu.

If the module was imported successfully, you'll see the following dialog box:

Obfuscation is complete.

  1. Click the "Yes" button to proceed.

If the obfuscation was successful, you'll see the following confirmation:

Proceed dialog

Make sure the project file is significantly obfuscated, and send it to us.

This is the source code to the obfuscator, if you prefer to create the module yourself:

Sub Obfuscate()

Dim prompt As String
Dim answer As String

prompt = "The Obfuscator will rename all task and resource names 
in this file." & vbCrLf & _
      "You should either obfuscate a backup copy of your 
project file or " & vbCrLf & _
      "save this file as a copy after the obfuscation 
(using Save As)." & vbCrLf & vbCrLf & _
      "Are you sure you wish to proceed?"


answer = MsgBox(prompt, vbYesNo, "Project Obfuscator")

If answer = vbNo Then
  Return
End If

nextTaskNum = 1
nextResourceNum = 1

For Each t In ActiveProject.tasks
  If Not t Is Nothing Then
    If t.ExternalTask = False Then
      t.Name = "Task " + Str(nextTaskNum)
      nextTaskNum = nextTaskNum + 1

      If t.Notes <> "" Then
        t.Notes = "Note was obfuscated"
      End If

      '
      'If Not t.Notes Is Nothing Then
      '  If t.Notes.Length > 0 Then t.Notes =
 "Note was obfuscated"

      'End If
    End If
  End If
Next t

For Each r In ActiveProject.Resources
  If Not r Is Nothing Then
    r.Name = "Resource " + Str(nextResourceNum)
    nextResourceNum = nextResourceNum + 1
  End If
Next r

MsgBox ("Obfuscation is complete.")
End Sub