I have a series of layout templates that we use to create figures for reports. One of the features of these layouts is the project number (Pxxxx for example). I would like to create some dynamic text to automatically update this when the mxd is saved to the project folder. The project number is always the first 5 characters of the Project's folder name i.e Pxxxx Project Name. Is there way to create some dynamic text code to pull the first five characters of the folder name so that the project number is always automatically updated when the mxd is saved.
I am using ArcMap 10.2.