Publishing a subweb to 14 sites

J

jeff

I have been trying to use Microsofts example macro to publish a web
site to multiple locations. It does not work (of course) and not being
a programmer, I am lost.

I have 14 websites that each contain from 1 to 5 subwebs with different
products. I make changes in Frontapge to pages in one subweb, then
publish it to each site that contains that subweb.

Needless to say, publishing one subweb to 14 different sites is time
consuming, and very boring :)

Does anyone know how to automate this task using a macro?

Below is the sample I got from MSN. It stops at "ActiveWeb.Publish
strSite" with the message" Websire already exists".

----------------------------------------------------------------------------------------
WebEx
Publishing a Web Site to Multiple Locations Example


Sub PublishToMultipleLocations(SiteURL() As String)
Dim intCount As Integer
Dim strSite As String

For intCount = LBound(SiteURL) To UBound(SiteURL)
strSite = SiteURL(intCount)
ActiveWeb.Publish strSite
Next
End Sub


Sub CallPublishToMultipleLocations()
Dim strURL(1 To 3) As String

strURL(1) = "http://147.202.67.132/products-bay"
strURL(2) = "http://147.202.67.133/products-bay"
strURL(3) = "http://147.202.67.134/products-bay"
strURL(4) = "http://147.202.67.135/products-bay"
strURL(5) = "http://147.202.67.136/products-bay"
strURL(6) = "http://147.202.67.141/products-bay"
strURL(7) = "http://147.202.67.143/products-bay"
strURL(8) = "http://147.202.67.144/products-bay"
strURL(9) = "http://147.202.67.145/products-bay"
strURL(10) = "http://147.202.67.160/products-bay"
strURL(11) = "http://147.202.67.161/products-bay"
strURL(12) = "http://147.202.67.162/products-bay"
strURL(13) = "http://147.202.67.163/products-bay"
strURL(14) = "http://147.202.67.164/products-bay"


Call PublishToMultipleLocations(strURL)

End Sub
 
C

Christoph Schneegans

Below is the sample I got from MSN. It stops at "ActiveWeb.Publish
strSite" with the message" Websire already exists".

ActiveWeb.Publish strSite

Change this line to

ActiveWeb.Publish strSite, PublishFlags:=fpPublishAddToExistingWeb

to allow FrontPage to overwrite an existing website.
 

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