WebOptionButton Object (Publisher)


Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Represents a Web option button control. The WebOptionButton object is a member of the Shape object.

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

Sub CreateNewWebOptionButton() 
 With ActiveDocument.Pages(1).Shapes 
 With .AddWebControl(Type:=pbWebControlOptionButton, Left:=100, _ 
 Top:=123, Width:=16, Height:=10).WebOptionButton 
 .Selected = msoTrue 
 End With 
 With .AddTextbox(Orientation:=pbTextOrientationHorizontal, _ 
 Left:=120, Top:=120, Width:=70, Height:=15) 
 .TextFrame.TextRange.Text = "Advanced User" 
 End With 
 End With 
End Sub
© 2015 Microsoft