Share via


WebCheckBox Object (Publisher)

Represents a Web check box control. The WebCheckBox object is a member of the Shape object.

Example

Use the AddWebControl method to create a Web check box. Use the WebCheckBox property to access a Web check box control shape. This example creates a new Web check box and specifies that its default state is checked; then it adds a text box next to it to describe it.

Sub CreateNewWebCheckBox() 
 With ActiveDocument.Pages(1).Shapes 
 With .AddWebControl(Type:=pbWebControlCheckBox, Left:=100, _ 
 Top:=123, Width:=17, Height:=12).WebCheckBox 
 .Selected = msoTrue 
 End With 
 With .AddTextbox(Orientation:=pbTextOrientationHorizontal, _ 
 Left:=118, Top:=120, Width:=70, Height:=15) 
 .TextFrame.TextRange.Text = "Description text for Web check box" 
 End With 
 End With 
End Sub