Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Browse for folder (Office All)

    Just as Kevin says but don't forget: "Set a reference to this component" or use the CreateObject as Andrew did above.
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  2. #17
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Browse for folder (Office All)

    Kevin the Ok button works in XP and Win ME, in that situation, but when clicked responds with Object doesn't support this action (notice the contracton !) .

    As far as I can see, using the Shell's BrowseForFolder is only good for folders, and only works in the later versions of Windows.

    Andrew

  3. #18
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Browse for folder (Office All)

    Once again, I concur, except to say it does supports Folders and Files (BIF_BROWSEINCLUDEFILES) as well.

    Alas, not printers. Therefore, the API version stays right where it is.

    Nowhere does the Shell32 object model reference at MSDN indicate that ANY of the flag values are not supported, illegal, etc.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  4. #19
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Browse for folder (Office All)

    I'm not too sure about Files. It is very unpredictable in XP, (Error : Method 'BrowseForFolder' of object 'IShellDispatch4' failed) and though in Windows ME it works except for selecting a file in the root folder.

    Andrew

  5. #20
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Browse for folder (Office All)

    'BIF_RETURNONLYFSDIRS - Only return file system directories. If
    ' - the user selects folders that are not part
    ' - of the file system, the OK button is grayed.
    'BIF_DONTGOBELOWDOMAIN - Do not include network folders below the
    ' - domain level in the tree view control.
    'BIF_STATUSTEXT - Include a status area in the dialog box.
    ' - The callback function can set the status
    ' - text by sending messages to the dialog box.
    'BIF_RETURNFSANCESTORS - Only return file system ancestors. If
    ' - the user selects anything other than a
    ' - file system ancestor, the OK button is grayed.
    'BIF_EDITBOX - Version 4.71. The browse dialog includes an
    ' - edit control in which the user can type the name of an item.
    'BIF_VALIDATE - Version 4.71. If the user types an invalid name
    ' - into the edit box, the browse dialog will call
    ' - the application's BrowseCallbackProc with the
    ' - BFFM_VALIDATEFAILED message. This flag is ignored
    ' - if BIF_EDITBOX is not specified.
    'BIF_BROWSEFORCOMPUTER - Only return computers. If the user selects anything
    ' - other than a computer, the OK button is grayed.
    'BIF_BROWSEFORPRINTER - Only return printers. If the user selects anything
    ' - other than a printer, the OK button is grayed.
    'BIF_BROWSEINCLUDEFILES - The browse dialog will display files as well as folders.

Page 2 of 2 FirstFirst 12

Posting Permissions

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