According to the MSDN documentation on that method it only returns a folder,
not a file. You might try something like FindFiles.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"DavidW" wrote in message
...
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