S
Shannon
I am trying to get a macro I created using VBA to work on
WSH so I can put it on the task scheduler. Everything is
fine except it bombs out on the very last line of code.
Any advice?
---------------------------------------------------------
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
Dim sSourceWebURL
Dim sDestWebURL
Dim oSourceWeb
Set oSourceWeb = WScript.CreateObject
("FrontPage.Application")
Dim oDestWeb
Set oDestWeb = WScript.CreateObject
("FrontPage.Application")
Dim oPublish
Set oPublish = WScript.CreateObject
("FrontPage.Application")
sSourceWebURL = "http://tlws01/pubsource"
sDestWebURL = "http://tlws01/pubdest"
oSourceWeb.Webs.Open (sSourceWebURL)
oDestWeb.Webs.Add (sDestWebURL)
oSourceWeb.Webs(0).Publish sDestWebURL,
fpPublishAddToExistingWeb
oDestWeb.ActiveWebWindow.Close
WSH so I can put it on the task scheduler. Everything is
fine except it bombs out on the very last line of code.
Any advice?
---------------------------------------------------------
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
Dim sSourceWebURL
Dim sDestWebURL
Dim oSourceWeb
Set oSourceWeb = WScript.CreateObject
("FrontPage.Application")
Dim oDestWeb
Set oDestWeb = WScript.CreateObject
("FrontPage.Application")
Dim oPublish
Set oPublish = WScript.CreateObject
("FrontPage.Application")
sSourceWebURL = "http://tlws01/pubsource"
sDestWebURL = "http://tlws01/pubdest"
oSourceWeb.Webs.Open (sSourceWebURL)
oDestWeb.Webs.Add (sDestWebURL)
oSourceWeb.Webs(0).Publish sDestWebURL,
fpPublishAddToExistingWeb
oDestWeb.ActiveWebWindow.Close