spiral2007
asked on
how can i change the option button value from vb.net to a word 2007 document?
hello experts,
i have a word 2007 document that contains a report. I am trying to complete the report from vb.net. i had successfully complete the text fields part but now i cant figure out how to change the option buttons value.
Any ideas?
here is a sample code from my project...
can u explain briefly and post sample code?
ASKER
hello dhansmani,
here is a sample code.
i can access text boxes and change their values but i dont know how to access radio buttons (Option Buttons in MS Word 2007) and change their values from uncheck to check
here is a sample code.
i can access text boxes and change their values but i dont know how to access radio buttons (Option Buttons in MS Word 2007) and change their values from uncheck to check
oWord = CreateObject("Word.Application")
oWord.Visible = True
oDoc = oWord.Documents.Add("C:\myReport.dotm")
oDoc.Bookmarks.Item("txtName").Range.Text = tb(0)("Name")
...
...
..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i did find any useful information...
ASKER
sorry .. i didnt find any useful information ..
ASKER
i find it thanks dhansmani!
oDoc.Bookmarks.Item("optionbuttonyes").Range.InlineShapes(1).OLEFormat.Object.value = True
oDoc.Bookmarks.Item("optionbuttonno").Range.InlineShapes(1).OLEFormat.Object.value = False
ASKER
oDoc.Bookmarks.Item("optio nbuttonyes ").Range.I nlineShape s(1).OLEFo rmat.Objec t.value = True