Publish Method Example

This example publishes the active web.

Note   If the web you are publishing to is an existing web, you must use the argument fpPublishAddToExistingWeb, otherwise your web won't be published. If the web you are publishing to doesn't exist, don't use the fpPublishAddToExistingWeb argument because you're web won't be published.

Private Sub PublishMyWeb()
Dim myWeb As Web
Dim myBaseURL As String
Dim myPublishParam As FpWebPublishFlags

Set myWeb = Application.ActiveWeb
myBaseURL = "http://www.Adventure-Works.com"
myPublishParam = fpPublishAddToExistingWeb

myWeb.Publish(myBaseURL, myPublishParam)
End Sub