Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Location
    Busselton, Western Australia, Australia
    Posts
    59
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Hi All,
    Is there a way to "shell" out to the "Windows Picture and Fax Viewer" application from within Excel VBA?
    I am using MS Office XP (2002) SP3
    I would like to be able to search for any photos for a given part number that may be stored on the system and then open and print them easily.
    Any suggestions?
    Thanks in advance.
    Brian.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Do the filenames resemble the part numbers?
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    Star Lounger
    Join Date
    Apr 2002
    Location
    Busselton, Western Australia, Australia
    Posts
    59
    Thanks
    1
    Thanked 2 Times in 2 Posts
    [quote name='pieterse' post='767200' date='25-Mar-2009 15:04']Do the filenames resemble the part numbers?[/quote]

    Yes they do.
    Something along the lines of Part number 11412378
    Photos might be 11412378-1.jpg; 11412378-2.jpg; 11412378-3.jpg etc...
    I would like to be able to fill a selection box and then have the user click on the photo/s they want and have them print out.
    Probably also preview the photo somehow...
    Thanks
    Brian.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You can use

    Shell "RunDLL32.exe C:\Windows\System32\Shimgvw.dll,ImageView_Fullscre en C:\My Pictures"

    to start the Image and Fax Viewer in a specific folder, or

    Shell "RunDLL32.exe C:\Windows\System32\Shimgvw.dll,ImageView_Fullscre en C:\My Pictures\Some File.jpg"

    to open a specific file. You can use a variable instead of a literal file name:

    Shell "RunDLL32.exe C:\Windows\System32\Shimgvw.dll,ImageView_Fullscre en C:\My Pictures\" & strFilename

  5. #5
    Star Lounger
    Join Date
    Apr 2002
    Location
    Busselton, Western Australia, Australia
    Posts
    59
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Thanks Hans,
    Just what I needed.
    Cheers
    Brian.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •