Even using vba, this would not be a trivial thing.
The display of a filename is through a field.
That field will display the filename as it displays on the user's computer, so if the user does not display extensions in Windows (the default) you get:
This is My Filename
If the user displays extensions, they would see:
This is My Filename.dotx
There is no way, using fields, to parse this.
Using Fields in Microsoft Word
Automated Boilerplate Using Microsoft Word