Visual Basic Code of the Week (COTW)
http://www.codeoftheweek.com
Issue #91
Online Version at http://www.codeoftheweek.com/membersonly/bi/0091.html (paid subscribers only)
All content and source code is Copyright (c) 1999 by C&D Programming Corp. No part of this issue can be reprinted or distributed in any manner without express written permission of C&D Programming Corp. Word, Excel and Visual Basic are trademarks of Microsoft Corp.

Consulting Services

We are offering our consulting services for all types of projects related to Visual Basic, Outlook, Exchange Server and other Microsoft environments. If you are looking for a high-quality company to provide outstanding consulting services to your organization, email us at consult@codeoftheweek.com

Advertising

If you are interested in advertising in COTW (our rates are VERY reasonable), please email us at sponsor@codeoftheweek.com


Requirements

In this Issue

This issue shows how to create an internet shortcut to any web resource.

basInternetShortcut

There is one routine in this module that does all the work in creating a shortcut to a web resource. This is useful if you wish to put an icon into the Favorites folder programmatically.

Methods

Public Sub CreateInternetShortcut(sDescription As String, sURL As String, Optional sShortcutPath As String = "")

This subroutine will create a shortcut to a web page similar to the way the Favorites feature works in Internet Explorer. The sDescription parameter will be the name of the shortcut. sURL is the URL (Universal Resource Locator) to the page this shortcut is supposed to provide a link to. An example would be http://www.codeoftheweek.com/issues. If sShortcutPath is not specified it will look up the location of the Favorites folder and deposit it in to that folder. If you specify a path in sShortcutPath it will create the shortcut there. This routine will not automatically create any subdirectories if they do not exist. Refer to issue number #7 at http://www.codeoftheweek.com/membersonly/bi/0007.html for details on how to accomplish this.

Sample Usage

Will create a shortcut to the Code of the Week home page in the Favorites folder.

    CreateInternetShortcut "Code of the Week Home Page", "http://www.codeoftheweek.com/index.html"

Source Code

To see the source code for this issue you must be a subscriber to Code of the Week. If you are a subscriber the source code is available at the following address: http://www.codeoftheweek.com/membersonly/bi/0091.html


This document is available on the web

Paid subscribers can view this issue in HTML format. There is no additional source or information in the HTML formatted document. It just looks a little better since we have included some HTML formatting. Just point your browser to link at the top of this document.

Other links

Contact Information

C&D Programming Corp.
PO Box 20128
Floral Park, NY 11002-0128
Phone or Fax: (212) 504-7945
Email: info@codeoftheweek.com
Web: http://www.codeoftheweek.com