Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: VB5,VB6,II4,II5
Expertise: Intermediate
Jun 23, 2001



Application Security Testing: An Integral Part of DevOps

AddToIEFavorites - Add a URL to the IE's favorites

' Add an URL to the IE's favorites by sending a client side JavaScript to IE
'   sURL is the URL that the link will point to
'   sDescr is the description displayed in the Favorites menu
' Example:
'   AddToIEFavorites "www.vb2themax.com", "VB-2-The-Max: the ultimate VB source"

Sub AddToIEFavorites(ByVal sURL As String, ByVal sDescr As String)
    sURL = LCase(sURL)
    ' add the http:// in case it isn't already present in the specified URL
    If Left$(sURL, 7) <> "http://" Then sURL = "http://" & sURL
    ' open Exploring and load the script
    ShellExecute 0, "Open", "javascript:window.external.AddFavorite('" & sURL & _
        "','" & sDescr & "')", "", "", 0
End Sub
Marco Bellinaso
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date