HOWTO: Use Keyword Expansion in HTML Files

Last reviewed: October 30, 1997
Article ID: Q161577
5.00 WINDOWS kbusage kbhowto

The information in this article applies to:

  • Microsoft Visual SourceSafe for Windows, version 5.0 on the following platforms: Macintosh, Unix, x86

SUMMARY

This article explains how to include the last update time, the name of the Web page, and other similar items in HTML files on the World Wide Web. You can automatically include these items through keyword expansion when you use Visual SourceSafe. You can also enter other items as regular comments so that they only appear in the source of the HTML document.

MORE INFORMATION

Setting up keyword expansion for HTML files is slightly different than using keywords in regular source code files like those used in Visual C++ and Visual Basic.

Enable Keywords for Web Documents

  1. Start the Visual SourceSafe Administrator.

  2. On the Tools -> Options menu, click the General tab.

  3. In "Expand Keywords in Files of Type," type: *.HTM, *.HTML, *.HTX

  4. Exit the Visual SourceSafe Administrator and restart the Visual SourceSafe Explorer.

You can use any keyword. However, because several keywords append historical data to files, the following keywords are recommended:

   For external viewing:
   $Date:     $
   $JustDate: $
   $Modtime:  $

   For internal documentation:
   $Author:   $
   $Archive:  $
   $Log:      $
   $Header:   $

Add Keywords to HTML Files

To add a keyword for external viewing, type:

   <!-- $$KeyWord: --><!-- $ -->

and then type:

   <p>Last Updated on: <!-- $$JustDate: --><!-- $ --></p>

The following prints out on the Web page when the .htm file is opened with a Web browser:

   Last Updated on: 1/1/96

To add a keyword for internal documentation, type:

   <!-- $KeyWord: $ -->

This command acts like a "regular" keyword in that the expansion is only visible when you view the .htm file in a text editor.

Note that any keyword that you want to display externally in HTML documents must be preceded by $$.

More information on how to manage Web sites with Visual SourceSafe can be found on the World Wide Web at www.microsoft.com/ssafe/techinfo/vssweb.htm.

REFERENCES

Microsoft Visual SourceSafe Help: HTML Keyword Expansion

(c) Microsoft Corporation 1996, All Rights Reserved. Contributions by Brian Matsik, Microsoft Corporation


KBCategory: kbusage kbhowto
KBSubcategory: ssusage
Additional reference words: 5.00 kbdss
Keywords : ssusage kbhowto kbusage
Version : 5.00
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.