Code: Select all
(1) ' Shell "C:\Windows\System32\mspaint.exe """ & strFullname & """""", vbMaximizedFocus
(2) Dim strCommand As String
(3) strCommand = "C:\Program Files\WindowsApps\microsoft.paint_11.2301.22.0_x64__8wekyb3d8bbwe\mspaint.exe """ & strFullname & """"", vbMaximizedFocus"
(4) strCommand = "C:\Program Files\WindowsApps\microsoft.paint_11.2301.22.0_x64__8wekyb3d8bbwe\mspaint.exe "
(5) strCommand = "mspaint.exe "
(6) Shell "mspaint.exe """ & strFullname & """""", vbMaximizedFocus
(7) Shell strCommand
Line (1) is the original code until 1600 today
Lines (5) through (7) are working now.
For years my code has had a hard-coded reference to the MSoft Windows application MSPaint.exe - that's what you see in line(1).
I used Everything1.5a (naturally!) to locate MSPaint,exe and found it in this folder:-
Code: Select all
C:\Program Files\WindowsApps\microsoft.paint_11.2301.22.0_x64__8wekyb3d8bbwe\PaintApp
There follows five minutes of experiment, which terminates when I discover that I do not need the Fullname of the application; the name alone suffices.
In a few days time I will have the energy to go back and tidy up my code.
Cheers, Chris