I use code to open pictures from web using Internet Explorer. Now I want to do it without Internet Explorer eg in paint or windows photo viewer. I sent my VBA code with using IE. Could you help me ? Thank you.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Path As String, s As String
Path = "http://08.15.40.22:0603/tralala/get_doc.pl?doc_id="
If Not Intersect(Target, Range("H7:H30")) Is Nothing _
And Target.Count = 1 Then
If IsNumeric(Target) And Len(Target) > 0 Then
s = Left(Target, Len(Target) - 2)
ActiveWorkbook.FollowHyperlink Path & s
End If
End If
End Sub
You can do this with a Shell
command:
Shell "RunDLL32.exe C:\Windows\System32\Shimgvw.dll,ImageView_Fullscreen " & Path & s
This opens Windows Picture & Fax Viewer full-screen with the image.
Or in MSPaint:
Shell Chr(34) & "C:\Windows\System32\mspaint.exe" & Chr(34) & " " & Chr(34) & Path & s & Chr(34), 1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.