Microsoft KB Archive/240671

= FP2000: How to Create a One-Page Web Using Visual Basic for Applications =

Article ID: 240671

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft FrontPage 2000 Standard Edition

-



This article was previously published under Q240671



SUMMARY
This article describes how to create a one-page Web using Visual Basic for Applications in FrontPage 2000.



MORE INFORMATION
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. Sub CreateWeb

'Set up variables Dim myWeb As FrontPage.Web Dim myFPApp As FrontPage.Application 'Create a new FrontPage application object Set myFPApp = CreateObject("FrontPage.Application") '*******************************************************************   '* In the following line of code, replace "mySite" with the name '* of the web server on which you want to create your web and replace '* "myWeb" with the name for your new web. '*   '* You can also replace "http://mySite/myWeb" with a local disk '* path (such as "c:\myWebs\myNewWeb") to create a disk-based web. '*******************************************************************   'Create the web Set myWeb = myFPApp.Webs.Add("http://mySite/myWeb") 'Add a home page and home navigation node myWeb.RootFolder.Files.Add myWeb.Properties("vti_welcomenames")(0) End Sub

When the Add method of the Webs collection is used, an empty Web is created. By setting the vti_welcomenames property of the newly created Web, you can create a home page and a home navigation node for the Web.

