R
Robert
I have modified and expanded the undermentioned vbHelp
code hoping to insert in a document some empty check
boxes to be checked with a pencil. I have achieved only
limited success because only the first CheckBox inserted
in the document is the desired size. The remainder are
displayed and printed in the default size (which I
thought I had turned off.)
How can I make all the Check Boxes the size set by the
Size Property, please?
______________________________
Sub Checkbox2()
' Macro to insert a Checkbox at end of Selection or at IP.
' Modified from VBA Help file. Call with ALT + (alpha)2
' Box shading is not visible in printed output.
Selection.Collapse Direction:=wdCollapseEnd
Set ffield = ActiveDocument.FormFields _
.Add(Range:=Selection.Range,Type:=wdFieldFormCheckBox)
ffield.Name = "Check_Box_1"
With ActiveDocument.FormFields("Check_Box_1").CheckBox
.AutoSize = False
.Size = 18
.Value = False 'Displays plain, empty box.
End With
End Sub
Heartiest thanks from Old England.
Robert.
code hoping to insert in a document some empty check
boxes to be checked with a pencil. I have achieved only
limited success because only the first CheckBox inserted
in the document is the desired size. The remainder are
displayed and printed in the default size (which I
thought I had turned off.)
How can I make all the Check Boxes the size set by the
Size Property, please?
______________________________
Sub Checkbox2()
' Macro to insert a Checkbox at end of Selection or at IP.
' Modified from VBA Help file. Call with ALT + (alpha)2
' Box shading is not visible in printed output.
Selection.Collapse Direction:=wdCollapseEnd
Set ffield = ActiveDocument.FormFields _
.Add(Range:=Selection.Range,Type:=wdFieldFormCheckBox)
ffield.Name = "Check_Box_1"
With ActiveDocument.FormFields("Check_Box_1").CheckBox
.AutoSize = False
.Size = 18
.Value = False 'Displays plain, empty box.
End With
End Sub
Heartiest thanks from Old England.
Robert.