The following command works in a command prompt:
%SystemRoot%\System32\rundll32.exe "C:\Program Files\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen C:\Test.jpg
In Excel VBA, I have tried several things. The first example below gets 53 File not found. The second example appears to run but nothing is displayed.
Sub ViewPhoto()
Dim strExe As String
strExe = """%SystemRoot%\System32\rundll32.exe ""%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll"", ImageView_Fullscreen c:\test.jpg"""
MsgBox strExe
'VBA.Shell strExe
strExe = """C:\Windows\System32\rundll32.exe ""%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll"", ImageView_Fullscreen c:\test.jpg"""
MsgBox strExe
VBA.Shell strExe
End Sub
I DO NOT want to embed the photos in Excel. They are updated frequently.
The following successfully opens PhotoViewer:
VBA.Shell "C:\Windows\System32\rundll32.exe ""C:\Program Files\Windows Photo Viewer\PhotoViewer.dll"", ImageView_Fullscreen"