Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOT! Need to open Kodak Camera folder in My computer using Explorer 3

Status
Not open for further replies.

DougP

MIS
Dec 13, 1999
5,985
US
We have techs taking thousands of photos of Sample points in the field. I would like my app to allow them to view the photos in my app and let them click on a particular photo which they can see is Sample 1234 lets say. They would already be on Sample 1234 record in a form.
Click a button that would rename it to the 1234.jpg instead of 100_0346.jpg
I can do everything except pop up Windows Explorer showing the Camera folder.
If you go to Explorer you can see the Camera when it is connected, its called "C653 Zoom Digital Camera" If you double click it, it opens showing the photos. This is Windows Explorer not a photo program . I want to do the same thing and copy the files of let them copy them.
If I shell to it like so it says folder not found
x=Shell("C653 Zoom Digital Camera",vbNormalFocus)
any ideas how to automate this would be appreciated. I don't like the Kodak Easy Share software 'cause it so huge and takes over the computer.

Thanks this is really HOT


DougP, MCP, A+
[r2d2] I Built my own R2D2
I love this site and all you folks that helped me over the years!
 
<I can do everything except pop up Windows Explorer showing the Camera folder.

You can't use shell to show a folder on the screen as far as I'm aware, and you certainly can't use it the way you're trying to. See if this works for you instead: set a reference to Microsoft Internet Controls (shdocvw.dll). Put a command button on a form. In the form's code window, add the followoing:
Code:
Private Sub Command1_Click()
Dim ie As InternetExplorer
Set ie = New InternetExplorer
ie.Navigate2 "C:\"
ie.Visible = True
End Sub
You can fine tune this in several ways. Read up on the internet controls to find out more.

HTH

Bob
 
Code:
[blue]Option Explicit

Private Sub Command1_Click()
    vbExplore "C653 Zoom Digital Camera"  '"Canon DIGITAL IXUS 430"
End Sub

Public Sub vbExplore(strFolder As String)
    Dim myFolderItem As Object
    
    With CreateObject("Shell.Application")
      For Each myFolderItem In .NameSpace(ssfDRIVES).Items
          If myFolderItem.Name = strFolder Then Exit For
      Next
      .Open myFolderItem
    End With
    
End Sub[/blue]
 
Thanks guys
I figured it out weeks ago. this is an old post

DougP, MCP, A+
[r2d2] I Built my own R2D2
I love this site and all you folks that helped me over the years!
 
Yeah, that HOT! thing got me, I had the feeling it was the most important post on the entire forum, since it was the only one that said HOT! on it. :p~~

strongm, does the shell.application object expose the shell command as a method or something? I mean when you put [tt]shell myfle.exe[/tt] are you in fact instantiating an object and calling its shell method in the manner of a global object?
 
No, it's the way in to automating the Windows 32-bit shell (e.g. components such as Windows Explorer). It's the same as adding a reference to Microsoft Shell Controls and Automation library. It is nothing to do with (well, very, very little to do with) the Shell command.
 
strongm >Perhaps you should have said ...

If it's any consolation I'm glad he didn't. I, and probably a few others, will find your example very useful.


[gray]Experience is something you don't get until just after you need it.[/gray]
 
Shell controls and automation library. Very good. Thanks strongm, this will be useful to me as well.
 
It will be useful to mention that you can open the "Scanners and Cameras" folder using Shell statement.
[tt]
Shell "explorer ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{E211B736-43FD-11D1-9EFB-0000F8757FCD}", vbNormalFocus
[/tt]
Perhaps you would be able to open the exact camera folder as well if you enumerate items in the "Scanners and Cameras" folder. I don't have any camera right now for testing.

See thread222-1154227 for details and more tricks with Shell Controls and Automation library.
 
In my code, if you display myFolderItem.Path you will see the CLSID that exists for a "special" folders.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top