Dynamic Text - limiting characters to document name

Discussion created by rusty_1981 on Jun 14, 2011
Latest reply on Jun 15, 2011 by rdharles
I've searched through the forum and couldn't find a similar question so apologies if this has already been answered before.

Within arcmap 10 looking at creating a specific map document id to display on the map layout made up of (first part of document name/company code/number field)

Its the first part of this id that i can not figure out. Example of a document name is abc123-file.mxd. What i would like to display is only abc123. Is there a way to amend the document name scripting to recognise the first part of the document name?