Sample ScriptsQ. How do I get rid of new_page1.htm?
A.
This is the original script written by Stephen
Bullen (MS MVP) with additional instructions from Jens Peter Karlsen
(MS MVP) on the issue. They have since posted a revised script.
Their solution uses some VBA:
The cause:
- It's an Active-X extension - which on
application(FP) start-up tries to
execute a VBA macro with the name 'Auto_Start'..
- Then this VBA Auto-Start macro checks if
there is a 'dummy' page, if yes
replaces it with the folder browser window.
The solution:
- Go to http://www.BMSLtd.co.uk/O2000 and
download and install the FPAutoStart COM Addin.
- In FrontPage, switch to the Visual
Basic Editor, add a class module, call it CFPEvents and paste in the following
code:
Public WithEvents oFP As Application
Dim bNewWeb As Boolean
Dim oWeb As Web
Private Sub oFP_OnWebOpen(ByVal pWeb As Web)
'Fired before the new WebWindow is created, so store the web
bNewWeb = True
Set oWeb = pWeb
End Sub
Private Sub oFP_OnPageNew(ByVal pPage As PageWindow)
'Fired after the WebWindow is created, when creating the blank page
If bNewWeb And (pPage.Web Is oWeb) Then
bNewWeb = False
If oWeb.ActiveWebWindow.ViewMode = fpWebViewPage Then
pPage.Close False
oWeb.ActiveWebWindow.ViewMode = fpWebViewFolders
End If
End If
End Sub
Private Sub oFP_WindowDeactivate(ByVal pWebWindow As WebWindow)
'Fired after the blank page has been created, just prior to showing it
bNewWeb = False
Set oWeb = Nothing
End Sub
- Add a standard module and
paste in the following code:
Dim oFPEvents As CFPEvents
Sub Auto_Start()
'The FPAutoStart COM Addin runs this when FrontPage starts
'Set up Application event hook to trap the WebOpen event
Set oFPEvents = New CFPEvents
Set oFPEvents.oFP = Application
'If showing Page view, close the blank page and switch to Folder view
If Application.WebWindows(0).ViewMode = fpWebViewPage Then
With Application.ActivePageWindow
If Not .IsDirty Then .Close
End With
Application.WebWindows(0).ViewMode = fpWebViewFolders
End If
End Sub
- Close and restart FrontPage
Note that 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)
|