Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FP2000: How to Add a Save All Command to the File Menu Using VBA


View products that this article applies to.

This article was previously published under Q256080

↑ Back to the top


Summary

This article describes how to add a Save All command to the File menu in FrontPage 2000 by using Microsoft Visual Basic for Applications (VBA).

↑ Back to the top


More information

To add a Save All command to the File menu, follow these steps:
1.On the Tools menu, point to Macro, and then click Visual Basic Editor (or press ALT+F11).
2.Insert a new module by clicking Module on the Insert menu.
3.In the Properties window (press F4), change the name of the module to SaveAll.
4.Type the following in the Microsoft_FrontPage - SaveAll (Code) window:
Sub SaveAll() 
   Dim page As PageWindow 
   For Each page In Application.ActiveWebWindow.PageWindows
      page.Save
   Next 
End Sub
						
5.On the File menu, click Close and Return to Microsoft FrontPage.
6.On the Tools menu, click Customize, and click the Commands tab.
7.In the Categories list, click Macros.
8.Use the drag-and-drop operation to copy Custom Menu Item from the Commands list to the File menu.
9.Click Modify Selection, and change the Name box from &Custom Menu Item to Save A&ll.
10.Click Modify Selection again, and click Assign Macro.
11.Click SaveAll on the list, and then click OK.
12.In the Customize dialog box, click Close.
For more information about how to use the sample code in this article, click the article number below to view the article in the Microsoft Knowledge Base:
212536 OFF2000: How to Run Sample Code from Knowledge Base Articles

↑ Back to the top


Keywords: KB256080, kbinfo

↑ Back to the top

Article Info
Article ID : 256080
Revision : 1
Created on : 11/4/2002
Published on : 11/4/2002
Exists online : False
Views : 287