I have to read candidate’s name from an excel sheet and open their respective resume. I have used for each loop. After the 8th candidate, I am getting this error.
This exception in MS Word usually comes when multiple threads attempt to simultaneously execute code within the object.
Can you try by adding some delay in between the open resume operation.
I have kept delay in between but still the error is thrown. Also this happens only for one particular user (happens at 9th row candidate)
@shrutika Check the activity/ operation once again which is causing and check also data in excel.
I am getting this error while reading resume for 9th candidate. The resume is present in the said folder, also verified that it is not open.
Check if there is any issue with the resume of that 9th candidate,
In the excel file, move that candidate at the end and check once.
Also, add try catch block so that processing of next candidates won’t stop in case of any error.
You can always track them using try catch and kill all application after 8th and where ever you are facing issue and restart and continue with your next record… once you done with all you can try to rerun for the records with the issues at the end.
You are right. The issue is with 9th candidate resume file. Putting try catch block solved the issue. Thank you.