how to find password protected word file

please help me out to rectify the below issue.how do i check/remove password from the word file which is password protected/encrypted..

programmatically i am trying to open the word files from a folder and doing the process but password protected files are poping up a a windows to enter the password and it's keep opening until user enter the password and not moving to next file.but i want skip those files/remove password which having password protected so that it will move to next file and do the process.