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.
- Right click HERE and choose "Save Target As" or "Save Link As" to download and save the source code as "obfuscate.bas".
- 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.
- Open the copy you made of the project file.
- In Project: Views → Macros → Visual Basic Editor. (NOTE: In versions of Project prior to 2013, it'll be in Tools → Macros)
- File → Import File
- 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.
- Open the new module by double-clicking on it. You should see the source code to the obfuscator.
- Run the code by selecting Run → Sub/UserForm from the menu.
If the module was imported successfully, you'll see the following dialog box:
- Click the "Yes" button to proceed.
If the obfuscation was successful, you'll see the following confirmation:
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