Hello, I’m sorry to be a pain, but I am discovering another “won’t work in PS 7, but works in PS 5.1 ISE”. I have found it convenient for my testing to have a .ps1 file sitting by so I can easily copy these short “2-liners”:
Thank you Mr Stuart Squibb for your response. I tried the line just before the Enums and got the message:
Resource Unavailable: Program 'Microsoft.Office.Interop.Excel.dll' failed to run.
No application is associated with the specified file for this operation. At line: 1 char: 1
+C:\WINDOWS\assembly\GAC_MSIL\Microsoft.Office.Interop.Excel\15.0.0.0
My PC is running Windows 10 64-bit, and Powershell 7 (1.43.1), free edition. I also have Office 2019 which has EXCEL application with it. Would be grateful for any tips/guidance. Thanks.
Thanks very much Olaf – it now works! Just typing that long string was a struggle … Also, I am suddenly “losing” the last few characters when reading Powershell.org posts and replies. My laptop (15") screen is already maximized. Thanks Stuart!
Yes, I cut-and-pasted several times, but it seems I missed the “tail end” portion … anyway, finally did it the primitive way: retyped the whole thing (!) … I am testing my screen with respect to Powershell.org webesit … no, I did not zoom, but will try out you suggestions first … Much thanks again for all the help.