Access checkbox in word 2000

S

steve

Hi All

I have several checkboxes on a Word document that I want to access via VB
net

These are checkboxes from the Control Toolbox toolbar
I have tried...

wordapp.ActiveDocument.StoryRanges(Word.WdStoryType.wdMainTextStory).FormFields("CheckBox1").CheckBox.Value
= true

but get error collection member doesn't exist

The checkbox is called Checkbox1 in Word

Any ideas

Regards

Steve
 
D

Doug Robbins

Have you tried without the "StoryRanges(Word.WdStoryType.wdMainTextStory)"

ActiveDocument.FormFields("CheckBox1").CheckBox.Value

should be all you need to get the value of a checkbox in the body of the
document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
T

Tony Jollans

Checkboxes from the Control Toolbox are not members of the FormFields
collection. Take a look in the Shapes or InlineShapes collection (depending
on format).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top