I have written a C# code in console application to open two excels and copy and paste data from one excel to another excel. It was working fine until the destination excel\'
Ensure that MS Word/Excel is not showing a dialog box that needs a response.
I set a breakpoint on the line that caused the failure, then set .Visible
to true in PowerShell, to find this:
$word.Visible = $true
After I clicked 'Yes' and updated the settings, after I re-ran my scripted COM interactions, they succeeded.