W
webwork
Hello,
I am trying to save broken link reports for over a hundred subwebs at
our university. Most of this is going well, but I am having trouble
closing out the previous web site. I tried several different methods
but they return an error if I don't use 'on error resume next'.
Any thoughts?
Scotty
----------------------
Private Sub save_report(Url)
If Right(Url, 1) = "/" Then Url = Mid(Url, 1, Len(Url) + 1)
'Verifies broken links in the current view
Dim objApp As FrontPage.Application
Dim objWebwdw As WebWindowEx
Set objApp = FrontPage.Application
objApp.Webs.Open (Url)
objApp.ActiveWeb.RecalcHyperlinks
objApp.ActiveWebWindow.VerifyAllLinks
titleurl = Url
fname = LCase(titleurl)
fname = Replace(fname, "http://", "")
fname = Replace(fname, "/", "_")
fname = Replace(fname, "\", "_")
fname = Replace(fname, ":", "")
fname = fname & ".htm"
objApp.ActiveWebWindow.SaveReport
reportviewModeEx:=fpWebViewExBrokenLinks, _
Title:="Broken Links for " & titleurl, _
DestinationURL:="D:\fp_reports\" & fname, _
ForceOverwrite:=True
On Error Resume Next
' all of the following cause error messages
Application.Quit
objApp.ActiveWebWindow.Close
objApp.WebWindows.Close
objApp.Webs(0).Close
objApp.ActiveWebWindow.Close
end sub
I am trying to save broken link reports for over a hundred subwebs at
our university. Most of this is going well, but I am having trouble
closing out the previous web site. I tried several different methods
but they return an error if I don't use 'on error resume next'.
Any thoughts?
Scotty
----------------------
Private Sub save_report(Url)
If Right(Url, 1) = "/" Then Url = Mid(Url, 1, Len(Url) + 1)
'Verifies broken links in the current view
Dim objApp As FrontPage.Application
Dim objWebwdw As WebWindowEx
Set objApp = FrontPage.Application
objApp.Webs.Open (Url)
objApp.ActiveWeb.RecalcHyperlinks
objApp.ActiveWebWindow.VerifyAllLinks
titleurl = Url
fname = LCase(titleurl)
fname = Replace(fname, "http://", "")
fname = Replace(fname, "/", "_")
fname = Replace(fname, "\", "_")
fname = Replace(fname, ":", "")
fname = fname & ".htm"
objApp.ActiveWebWindow.SaveReport
reportviewModeEx:=fpWebViewExBrokenLinks, _
Title:="Broken Links for " & titleurl, _
DestinationURL:="D:\fp_reports\" & fname, _
ForceOverwrite:=True
On Error Resume Next
' all of the following cause error messages
Application.Quit
objApp.ActiveWebWindow.Close
objApp.WebWindows.Close
objApp.Webs(0).Close
objApp.ActiveWebWindow.Close
end sub