VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Create an Internet shortcut

by Anonymous (267 Submissions)
Category: Internet/HTML
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Fri 1st October 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Create an Internet shortcut

Rate Create an Internet shortcut



'Here is an example...    
CreateInternetShortCut "C:\windows\desktop\test.url", "http://www.vbcode.com"

Sub CreateInternetShortCut(URLFile As String, URLTarget As String)

'An Internet Shortcut takes on the form of
'   [InternetShortcut]
'   URL=http://www.YourWebSiteAddress.com   

    Dim intFreeFile As Integer

    'get free file number
    intFreeFile = FreeFile
    
    'print the URL file
    Open URLFile For Output As intFreeFile
    Print #intFreeFile, "[InternetShortcut]"
    Print #intFreeFile, "URL=" & URLTarget
    Close intFreeFile
    
End Sub

Download this snippet    Add to My Saved Code

Create an Internet shortcut Comments

No comments have been posted about Create an Internet shortcut. Why not be the first to post a comment about Create an Internet shortcut.

Post your comment

Subject:
Message:
0/1000 characters