Value Property

Microsoft Publisher Visual Basic

Returns or sets a String that represents the value of a Web check box or option button. Read/write.

expression.Value

expression    Required. An expression that returns one of the above objects.

ShowValue property as it applies to the MailMergeDataField and MailMergeMappedDataField objects.

Returns a String that represents the value of a mail merge data field record or a mapped data field. Read-only.

expression.Value

expression    Required. An expression that returns one of the above objects.

ShowValue property as it applies to the Tag object.

Returns or sets a Variant that represents the value of a tag of a shape, page, or publication. Read/write.

expression.Value

expression    Required. An expression that returns one of the above objects.

Example

ShowAs it applies to the WebCheckBox object.

This example creates a new Web check box control, assigns a name and value to it, and indicates its initial state is checked.

Sub CreateWebButton()
    With ActiveDocument.Pages(1).Shapes.AddWebControl _
            (Type:=pbWebControlCheckBox, Left:=72, _
            Top:=72, Width:=100, Height:=50)
        .Name = "ControlBox"
        With .WebCheckBox
            .Value = "This is a check box."
            .Selected = msoTrue
        End With
    End With
End Sub
				

ShowAs it applies to the Tag object.

This example creates a new tag for the active publication and then displays the value of the tag.

Sub CreatePublicationTag()
    With ActiveDocument
        .Tags.Add Name:="ActivePub", Value:="This is the active publication."
        MsgBox .Tags(1).Value
    End With
End Sub