Referring to checkbox in Word

BigDaddyPooBah
04-07-2004, 02:08 PM
Hi,

I want to know how I can set a checkbox value in word document with visual basic 6.0 (using WORD object in VB app)

NOTE: I want to use the checkbox control from the CONTROL TOOLBOX TOOLBAR---not the Forms toolbar as I like the look of checkbox belonging to the control toolbox.

I can't seem to refer to the checkbox at all nor set any of its properties.

Can anyone help me?

Thanks.

herilane
04-07-2004, 02:34 PM
ExampleDim wrd As Word.Application
Set wrd = New Word.Application
wrd.Visible = True

wrd.Documents.Open "c:\temp\test.doc"

Dim inl As Word.InlineShape
Set inl = wrd.ActiveDocument.InlineShapes(1)

Dim obj As Object
Set obj = inl.OLEFormat.object

obj.Value = Not obj.Value
wrd.ActiveDocument.Save
wrd.Quit
Set wrd = Nothing

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum