msoFileDialogFilePicker

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to get the path of a file with the office open or the file picker
dialogue using VBA. The file is a lotus notes shortcut. The file works fine
when double clicking on the desktop but when double clicking in the dialogue
box or single clicking and pressing the open button the following message is
displayed.

Cannot resolve this link this file may not be a shortcut.

Can any one tell me a way to disable the validation in the dialogue.
 
RayL said:
I am trying to get the path of a file with the office open or the
file picker dialogue using VBA. The file is a lotus notes shortcut.
The file works fine when double clicking on the desktop but when
double clicking in the dialogue box or single clicking and pressing
the open button the following message is displayed.

Cannot resolve this link this file may not be a shortcut.

Can any one tell me a way to disable the validation in the dialogue.

I'm guessing it's not just a simple shortcut, but I don't know anything
about Lotus Notes. If you're trying to open the file with the shortcut,
you may be able to accomplish it by passing the shortcut path/name to
the ShellExecute API, using the code at this link:

http://www.mvps.org/access/api/api0018.htm
API: Start an app with ShellExecute
 
Dirk
Thanks for the sugestion but I only need the path to the file which then
gets passed to the filecopy command.

Regards Ray
 
RayL said:
Dirk
Thanks for the sugestion but I only need the path to the file which
then gets passed to the filecopy command.

*Maybe* you can use Windows scripting objects to get the information you
need out of the shortcut. You could try something like

Dim sh As Object
Dim shtcut As Object

Set sh = CreateObject("WScript.Shell")
set shtcut = sh.CreateShortcut("<the path to the shortcut>")

' And now use the Immediate Window to see if any of
' the properties of the shortcut contains the info you want.
 
Dirk
The problem here is that the routine I use is needed for a wide verity of
file types.

A bit more info about what I am trying to achieve.
I have wrote my own custom document management system that supports some
600+ users the document management system needs to be able to identify the
source location of a file during an import not just the .shb extension which
is not known till the dialogue is actually on the screen. Once the path is
returned to the document management system the file is copied to a central
file server.

Is there another dialogue I could use which has not got any validation but
will return the path.

Best Regards Ray
 
Dirk
The problem here is that the routine I use is needed for a wide verity of
file types.

A bit more info about what I am trying to achieve.
I have wrote my own custom document management system that supports some
600+ users the document management system needs to be able to identify the
source location of a file during an import not just the .shb extension which
is not known till the dialogue is actually on the screen. Once the path is
returned to the document management system the file is copied to a central
file server.

Is there another dialogue I could use which has not got any validation but
will return the path.

Best Regards Ray
 
Back
Top