H
Hemant
Hi,
I have placed some controls (from View -> Toolbars -> Control Toolbox) on
the word form. I 'm restricted to use controls from this toolbox only. What i
have been asked is to have a button on a word form and when that button is
clicked, i must display using a msgbox, the name of the control, its caption
and some other properties of the control.
I have tried this but it is not helping me.
Dim fld As Field
dim fldCount as Integer
dim intIndex as Integer
for intIndex = 1 to ThisDocument.Fields.Count
Set fld = ThisDocument.Fields(intIndex)
If fld.Type = TextboxType Then
' show text box name and text
elseif fld.Type = CheckboxType then
' show checkbox name and checked state (T / F)
elseif ....(more controls)
End If
Next intIndex
I have placed some controls (from View -> Toolbars -> Control Toolbox) on
the word form. I 'm restricted to use controls from this toolbox only. What i
have been asked is to have a button on a word form and when that button is
clicked, i must display using a msgbox, the name of the control, its caption
and some other properties of the control.
I have tried this but it is not helping me.
Dim fld As Field
dim fldCount as Integer
dim intIndex as Integer
for intIndex = 1 to ThisDocument.Fields.Count
Set fld = ThisDocument.Fields(intIndex)
If fld.Type = TextboxType Then
' show text box name and text
elseif fld.Type = CheckboxType then
' show checkbox name and checked state (T / F)
elseif ....(more controls)
End If
Next intIndex