Open JPEG

P

Pete Beall

I'm opening a JPEG using the following (DAO):

Dim PhotoLink As String

PhotoLink = "C:\PWB\Photo\Documentation\" & (Me![Roll number]) & ".jpg"

FollowHyperlink (PhotoLink)

My default for JPEGs is "Windows Picture and Fax Viewer", but this code
insists on opening the picture in "Microsoft Photo Editor".

Can anyone help me open in "Windows Picture and Fax Viewer"?

Thanks
 
R

Rob Oldfield

I don't have Windows Picture and Fax Viewer so I can't be sure, but in
general terms the way to specify a particular program to open a file in
would be to run...

<path to program exe> <path to file to be opened>

....with possibly a switch or two in the middle to specify exactly what to
do. This info would only be available in the Picture Viewer program itself.

Having said that, a quick search around Google (for "Windows Picture and Fax
Viewer" command line) seems to indicate that there isn't an exe to run.
There are, though, quite a few suggestions about what to use. The one that
goes...

rundll32.exe C:\WINDOWS\System32\shimgvw.dll,ImageView_Fullscreen <target
file>

looks to be the most likely but it's a case of just trying the various
methods suggested until you find the one that works.

Once you have that figured out, you can try running the same command via
Shell from Access.
 
P

Pete Beall

Thanks, I’m getting this to work from the command line. I now realize that I
have no idea how to run an executable program outside of Access from code.

Any help?

Pete

Rob Oldfield said:
I don't have Windows Picture and Fax Viewer so I can't be sure, but in
general terms the way to specify a particular program to open a file in
would be to run...

<path to program exe> <path to file to be opened>

...with possibly a switch or two in the middle to specify exactly what to
do. This info would only be available in the Picture Viewer program
itself.

Having said that, a quick search around Google (for "Windows Picture and
Fax
Viewer" command line) seems to indicate that there isn't an exe to run.
There are, though, quite a few suggestions about what to use. The one
that
goes...

rundll32.exe C:\WINDOWS\System32\shimgvw.dll,ImageView_Fullscreen <target
file>

looks to be the most likely but it's a case of just trying the various
methods suggested until you find the one that works.

Once you have that figured out, you can try running the same command via
Shell from Access.


Pete Beall said:
I'm opening a JPEG using the following (DAO):

Dim PhotoLink As String

PhotoLink = "C:\PWB\Photo\Documentation\" & (Me![Roll number]) & ".jpg"

FollowHyperlink (PhotoLink)

My default for JPEGs is "Windows Picture and Fax Viewer", but this code
insists on opening the picture in "Microsoft Photo Editor".

Can anyone help me open in "Windows Picture and Fax Viewer"?

Thanks
 
R

Rob Oldfield

Dim retval
dim cmdLine as string
cmdLine="rundll32.exe ......" 'the command you have working
retval = Shell(cmdLine, vbNormalFocus)


Pete Beall said:
Thanks, I'm getting this to work from the command line. I now realize that I
have no idea how to run an executable program outside of Access from code.

Any help?

Pete

Rob Oldfield said:
I don't have Windows Picture and Fax Viewer so I can't be sure, but in
general terms the way to specify a particular program to open a file in
would be to run...

<path to program exe> <path to file to be opened>

...with possibly a switch or two in the middle to specify exactly what to
do. This info would only be available in the Picture Viewer program
itself.

Having said that, a quick search around Google (for "Windows Picture and
Fax
Viewer" command line) seems to indicate that there isn't an exe to run.
There are, though, quite a few suggestions about what to use. The one
that
goes...

rundll32.exe C:\WINDOWS\System32\shimgvw.dll,ImageView_Fullscreen <target
file>

looks to be the most likely but it's a case of just trying the various
methods suggested until you find the one that works.

Once you have that figured out, you can try running the same command via
Shell from Access.


Pete Beall said:
I'm opening a JPEG using the following (DAO):

Dim PhotoLink As String

PhotoLink = "C:\PWB\Photo\Documentation\" & (Me![Roll number]) & ".jpg"

FollowHyperlink (PhotoLink)

My default for JPEGs is "Windows Picture and Fax Viewer", but this code
insists on opening the picture in "Microsoft Photo Editor".

Can anyone help me open in "Windows Picture and Fax Viewer"?

Thanks
 
P

Pete Beall

Thanks again.

Rob Oldfield said:
Dim retval
dim cmdLine as string
cmdLine="rundll32.exe ......" 'the command you have working
retval = Shell(cmdLine, vbNormalFocus)


Pete Beall said:
Thanks, I'm getting this to work from the command line. I now realize
that I
have no idea how to run an executable program outside of Access from
code.

Any help?

Pete

Rob Oldfield said:
I don't have Windows Picture and Fax Viewer so I can't be sure, but in
general terms the way to specify a particular program to open a file in
would be to run...

<path to program exe> <path to file to be opened>

...with possibly a switch or two in the middle to specify exactly what to
do. This info would only be available in the Picture Viewer program
itself.

Having said that, a quick search around Google (for "Windows Picture
and
Fax
Viewer" command line) seems to indicate that there isn't an exe to run.
There are, though, quite a few suggestions about what to use. The one
that
goes...

rundll32.exe C:\WINDOWS\System32\shimgvw.dll,ImageView_Fullscreen <target
file>

looks to be the most likely but it's a case of just trying the various
methods suggested until you find the one that works.

Once you have that figured out, you can try running the same command
via
Shell from Access.


I'm opening a JPEG using the following (DAO):

Dim PhotoLink As String

PhotoLink = "C:\PWB\Photo\Documentation\" & (Me![Roll number]) &
".jpg"

FollowHyperlink (PhotoLink)

My default for JPEGs is "Windows Picture and Fax Viewer", but this
code
insists on opening the picture in "Microsoft Photo Editor".

Can anyone help me open in "Windows Picture and Fax Viewer"?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top