|
Pacific Database |
|
| Home Company Services Employment Support Centre Contact Us | |
|
A world of information at your fingertips |
|
Creating Windows ShortcutsThis isn't something that gets frequently asked for in the newsgroups, but creating a Windows shortcut is not really all that hard to do. What is hard is creating a shortcut that's customised for Access. This function allows you to do just that, and more:
The code to do this was originally written by Dave Scarmozzino (www.thescarms.com). I modified it to work specifically from Microsoft Access, using VBA.
|
Tested on...
RequiresThis function requires the following file, and your database must contain a reference to it. You can download this file from here or by clicking the button shown at bottom left. What is ShellLnk.tlb?ShellLnk.tlb is a type library, developed by Microsoft, that makes the Windows Explorer IShellLnk interface available to Visual Basic (or in our case VBA). It is a non-ActiveX file, which just means you don't need to register it with COM (it doesn't really matter if you don't understand that). Make sure the ShellLnk.tlb file is located in the same folder as your database, or in a folder specified by the path command. What's the path command? The path command is a DOS command that controls the folders in which the operating system searches for executable files. When looking for an executable file (or a type library), the operating system will search in the current folder first, then each of the folders specified by the path command until it finds the one it's looking for. If it doesn't find the file in those locations, it will return a File Not Found error. From the DOS command line, enter the word "path" (without the quote marks) and press <Enter>. If ShellLnk.tlb is not located in the database folder, it must be in one of the folders listed by the path command. How do I add a reference?Click here to find out. |
| Home • Company • Services • Employment • Support Centre • Contact Us | Pacific Database © 2008 |