OnBeforePublish Event

       

Occurs before a web is published.

Private Sub expression_OnBeforePublish(Destination As String, Cancel As Boolean)

expression   A variable name which references an object of type WebEx declared with events in a class module.

Destination   A String that specifies the URL of the published web.

Cancel   A Boolean that determines if the publish operation will be cancelled. If True, the web will not be published.

Remarks

This event can be cancelled.

Example

The following example displays a message to the user before a web is published. It also allows the user to cancel the event before it occurs.

Private Sub expression_OnBeforePublish(Destination As String, Cancel As Boolean)
'Occurs before a web is published.

    Dim strAns As Boolean

    strAns = MsgBox _
        ("Are you sure you want to publish to the following destination: " & _
            Destination)
    If strAns = False Then
        Cancel = True
    Else
        Cancel = False
    End If

End Sub