Hi Neil,
Try something like
Dim strPaint As String
Dim strPicture As String
strPaint = Environ("SYSTEMROOT") & "\System32\mspaint.exe"
strPicture = "C:\folder\file.bmp"
Shell """" & strPaint & """ """ & strPicture & """", _
vbNormalFocus
If you add /p before the final quotation mark, e.g.
... strPicture & """ /p",
Paint will send the picture straight to the default printer.
That's for using Paint regardless of the user's preferences. If instead
you use something like this:
Dim strPicture As String
strPicture = "C:\folder\file.bmp"
Application.FollowHyperlink strPicture
it will open the picture in whatever is the user's default program for
files of that type.
hell("""C:\Windows\System32\mspaint.exe"" ""C:\Documents and
Settings\John Nurick\My Documents\My Pictures\People.gif""")
>I have a database that stores the pathname pictures in certain fields, and on
>my form I have small thumbnails of those pictures.
[quoted text clipped - 8 lines]
>
>Neil
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
Neil - 15 Feb 2005 08:09 GMT
Thanks John,
Tried the second option and it worked a treat.
Neil
> Hi Neil,
>
[quoted text clipped - 44 lines]
>
> Please respond in the newgroup and not by email.