Building custom solutions that extend, automate, and integrate Microsoft 365 apps.
Thank you for providing the detailed information and for sharing the troubleshooting steps you have already tried.
In this case, I would recommend also posting your question in the Microsoft Tech Community, where Microsoft engineers, MVPs, and other developers may have experience with similar VSTO and OLE scenarios.
Microsoft Tech Community– a good place to discuss Microsoft 365 and SharePoint/OneDrive development scenarios with community experts, MVPs, and Microsoft contributors.
When posting, I would suggest including the relevant portion of your Shapes.AddOLEObject code and the exact exception, error message, or HRESULT returned when the operation fails. This may help others investigate the behavior more accurately.
I apologize for redirecting you to another community. Since I do not have the specific technical knowledge required to properly troubleshoot this code, I would rather not provide advice that could be misleading.
Thank you again for your time and understanding. While my response may not resolve the issue immediately, I hope the Microsoft Tech Community can provide more specialized insight into the behavior you are experiencing.