
|
FrontPage® 2000 Frequently Asked
QuestionsQ. 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:
- 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 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 ModuleCall
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
- 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:
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
- 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).
- 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
- 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.
|