SiteBuilder Logo Header


0
Users Online
0 Visitors Today
21 Pages Viewed Today
 

Try J-Bots Plus 2000 or J-Bots 2000 add-in components for FrontPage 2000 featuring components that can make your web sites more attractive, more engaging, and easier to navigate. They're fast and easy to use, and require no programming skills. Simply fill in dialog boxes, click the Generate button, and JavaScript code will automatically create the function you desire.


Microsoft FrontPage

Active Server Pages

Dynamic HTML

Sample Scripts

Web Servers

Tutorials

Third Party Solutions

Links to Other Sites

Discussion Groups

Search


Microsoft Certified Professional

Microsoft MVP

 

 

 

 

*

Sample Scripts

Q. How do I get rid of new_page1.htm? (FrontPage® 2000)

A.

There is a fix to this but it's a little tricky. Here's a script that Stephen Bullen (MS MVP) wrote with additions posted by Jens Peter Karlsen (MS MVP), who provided the steps for creating the modules. Stephen's solution uses some VBA.

Note: This is a revised script that was recently posted.  To see the original click here.

The cause:

  1. It's an Active-X extension - which on application(FP) start-up tries to
    execute a VBA macro with the name 'Auto_Start'..
  2. Then this VBA Auto-Start macro checks if there is a 'dummy' page, if yes
    replaces it with the folder browser window.

The solution:

  1. Go to http://www.BMSLtd.co.uk/O2000 and download and install the FPAutoStart COM Addin.

  2. In FrontPage, switch to the Visual Basic Editor and add a class module

    Choose Tools | Macros | Visual Basic Editor (ALT + F11). Then right-click Modules on the Project Menu and choose Insert | Class Module

    Call it CFPEvents and paste in the following code:

    Public WithEvents oFP As Application

    Private Sub oFP_OnWebOpen(ByVal pWeb As Web)

    'Default all webs to Folder view when opened
    pWeb.ActiveWebWindow.ViewMode = fpWebViewFolders

    End Sub

  3. Next, Add a Normal Module by right-clicking Modules and choosing Insert, Modules.  In the Properties Pane, Name it AutoStart and paste in the following code:
  4. Dim oFPEvents As CFPEvents

    Sub Auto_Start()

    'Initialize our event handler class
    Set oFPEvents = New CFPEvents
    Set oFPEvents.oFP = Application

    'If starting FP in Page View...
    If Application.WebWindows(0).ViewMode = fpWebViewPage Then

    '... Get the active page window (which should be the New_Page one) ...
    With Application.ActivePageWindow

    '... and close it, checking that it really is a blank/unedited one.
    If Not .IsDirty Then .Close
    End With
    End If
    End Sub

  5. They recommend having FPAutoStart set to load on startup. Choose Tools | Add-Ins and make sure that FrontPage 2000 Auto_Start Support is checked 

    The code in the Auto_Start routine handles the blank page when FP starts, while the code in the class module ensures that all webs are opened in Folder view

    Note: The solution has chosen to show Folder view instead of Page view, but you can change that for any of the other views (or just leave it in Page view with a grey area showing).

  6. As a Bonus, Stephen has included the following code snippet for free, which prompts you to save changes to any edited pages when you publish the web (by default, you don't get asked and changed pages don't make it to the web). Put this in the CFPEvents class module, too:

    Note: Just Copy and Paste the below code under the one that is already there.

    Private Sub oFP_OnBeforeWebPublish(ByVal pWeb As Web, Destination As String, Cancel As Boolean)

Dim oWebWin As WebWindow, oPage As PageWindow

'Loop through each window in the web
For Each oWebWin In pWeb.WebWindows

'Loop through each open page
For Each oPage In oWebWin.PageWindows

'Has it been edited?
If oPage.IsDirty Then
Select Case MsgBox("Save changes to " & oPage.Caption & "?", vbYesNoCancel)
Case vbYes
'Force a save
oPage.Save True
Case vbNo
'Do nothing
Case vbCancel
'Cancel the publish
Cancel = True
Exit Sub
End Select
End If
Next
Next

End Sub

  1. Close and restart FrontPage

Note As I mentioned earlier, I did not write this script, I'm simply providing it as a resource for you to use.


© Copyright, 1998 - 2003, NetSites, LLC.  All rights reserved.
Email Questions or Comments to sitebuilder@net-sites.com

All products and company names mentioned herein are the trademarks of their respective owners.
Microsoft® and FrontPage® are registered trademarks of Microsoft Corporation in the United States and/or other countries.