View Single Post
  #1  
Old April 20th 06, 03:35 PM posted to microsoft.public.outlook.program_forms
DavidW
external usenet poster
 
Posts: 20
Default Browsing For Files

I have added the following code to my form to open a browse dialog:

Dim oShell
Dim oFolder
Dim oFolderItem
Dim strFilePath

Set oShell = CreateObject("Shell.Application")
Set oFolder = oShell.BrowseForFolder(0,"OpenFile",&H4000+&H0200)
If not isnull(oFolder.Items.Item) then
Set oFolderItem = oFolder.Items.Item
End If

This code opens a browse dialog but if I select a file it returns nothing
but will return the path of a folder if I select it. What I want to be able
to do is generate the full path to a file including the filename. Can anyone
tell me how to do this please?

Thanks
Ads