FrontPage Publish using WSH

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top