@Soumya21,
Just to be clear are the copy/paste issues only seen when you encounter the RPC error? What is the actual RPC error message?
Generally, there's not a lot that can be done with regards to RPC errors when trying to automate Office applications. This comes down to simple issues between managed applications (i.e. Blue Prism) and legacy COM-based applications (i.e. Excel). The common theme I've seen for addressing this, in various support forums and Stack Overflow), are to do exactly what you are doing. Catch the exception and retry.
🙁
With that said, you might want to take a look at Microsoft's Graph API. This gives you a REST API for dealing with some Office apps (excluding Word at this time). The main catch to Graph is that you have to be dealing with files stored in the Azure cloud (ex. OneDrive or SharePoint).
Cheers,
------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------