Publishes a web to a Web server, whether on a server running Microsoft Internet Information Services (IIS) or on a Personal Web Server.
expression.Publish(DestinationUrl, PublishFlags, UserName, Password)
expression An expression that returns a WebEx object.
DestinationUrl Required String. A string that contains the entire target URL for the web, such as “http://wwwroot/Adventure Works”. This can be any URL for a web, such as http://web server/folder or file://file system/folder for disk-based webs.
PublishFlags Optional FpWebPublishFlags.
FpWebPublishFlags can be one of these FpWebPublishFlags constants. |
fpPublishAddToExistingWeb |
fpPublishCopyAllFiles |
fpPublishCopySubwebs |
fpPublishIncremental |
fpPublishLogInTempDir |
fpPublishNoDeleteUnmatched |
fpPublishUseLastPublishTime |
fpPublishNone default |
UserName Optional String. The name of the user who is publishing the web.
Password Optional String. The password of the user.
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 WebEx
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