OpenNTF.org - Adding a shortcut to a user's
My Links (Not logged in)
Code Bin Search
 
Hosted by Prominic.NET
Rate This Code
5 - brilliant stuff
4 - very nice
3 - average
2 - needs work
1 - bad
   OpenNTF Code Bin
About This Code
Brief Description:
Adding a shortcut to a user's desktop from a hotspot button 
Rating:
Rating: 4 , Number of votes: 1 
Contributor:
Charles Robinson 
Category:
Application, Lotusscript 
Type:
Example Code 
Notes Version:
R6.x, R5.x, R7.x 
Last Modified:
24 Aug 2006 
OpenNTF Disclaimer

All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.

Code / Description
If you want to send a user an e-mail with a hotspot button to copy a file from a mapped network drive and create a shortcut to it on the user's desktop, use this LotusScript code:


Sub Initialize()

Dim sDesktop As String
Dim sMyDocs As String

Dim oShell As Variant
Dim oShortcut As Variant
Dim oFS As Variant

Set oShell = CreateObject("WScript.Shell")
Set oFS = CreateObject("Scripting.FileSystemObject")

sDesktop = oShell.SpecialFolders("Desktop")
sMyDocs = oShell.SpecialFolders("MyDocuments")

'Copy the file
Filecopy "P:\Charles\BPS Barcodes.mdb", sMyDocs & "\BPS Barcodes.mdb"

'Create shortcut
Set oShortcut = oShell.CreateShortcut(sDesktop & "\BPS Barcodes.lnk")
oShortcut.TargetPath = sMyDocs & "\BPS Barcodes.mdb"
oShortcut.Save

Messagebox "Installation successful.", 0, "BPS Barcodes"

Enb Sub

Usage / Example
 Comments

No documents found

 Add your comment!