Create ShortCut Link at the desired location

Create ShortCut at the desired location.

Option Explicit
Sub MakeShortcut()
'//Need to refer to Windows Script Host Object Module
    Dim WSH As New IWshRuntimeLibrary.IWshShell_Class
    Dim WSHShortcut As IWshRuntimeLibrary.IWshShortcut_Class
    Dim strPath As String
    strPath = "\\aphydbanhllbsd\share\selva\Shortcut.lnk"
    Set WSHShortcut = WSH.CreateShortcut(strPath)
    With WSHShortcut
        .TargetPath = "https://socko.wordpress.com"
        .Description = "Description of shortcut"
        '       Location of Icon
        .IconLocation = "%SystemRoot%\system32\SHELL32.dll,5"
        .RelativePath = "c:\temp"
        .WorkingDirectory = "c:\"
        'Hot Key
        .Hotkey = "Ctrl+Alt+Q"
        .Save
    End With
Next i
End Sub

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: