Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2005

Tip: Looking for answers? Try searching our database.

Access checkbox in word 2000

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
steve - 14 Oct 2005 04:45 GMT
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
Doug Robbins - 14 Oct 2005 05:25 GMT
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.

Signature

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

> Hi All
>
[quoted text clipped - 16 lines]
>
> Steve
Tony Jollans - 14 Oct 2005 17:02 GMT
Checkboxes from  the Control Toolbox are not members of the FormFields
collection. Take a look in the Shapes or InlineShapes collection (depending
on format).

--
Enjoy,
Tony

> Hi All
>
[quoted text clipped - 3 lines]
> These are checkboxes from the Control Toolbox toolbar
> I have tried...

wordapp.ActiveDocument.StoryRanges(Word.WdStoryType.wdMainTextStory).FormFie
lds("CheckBox1").CheckBox.Value
> = true
>
[quoted text clipped - 7 lines]
>
> Steve
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.