Employee was returning from getting water in Maintenance Office. Upon re-entering the loader cab he put his right hand where door closes and utilized his left hand to shut the door. He thought he could move his right hand before the door shut. The door shut on his right middle finger. He reopened the door and removed his finger.