Solved

how can i change the option button value from vb.net to a word 2007 document?

Posted on 2010-08-19
7
282 Views
Last Modified: 2013-11-27


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...
0
Comment
Question by:spiral2007
  • 5
  • 2
7 Comments
 
LVL 14

Expert Comment

by:Dhanasekaran Sengodan
ID: 33482570
can u explain briefly and post sample code?
0
 

Author Comment

by:spiral2007
ID: 33482726
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
oWord = CreateObject("Word.Application")

        oWord.Visible = True

        oDoc = oWord.Documents.Add("C:\myReport.dotm")



        oDoc.Bookmarks.Item("txtName").Range.Text = tb(0)("Name")

...

...

..

Open in new window

0
 
LVL 14

Accepted Solution

by:
Dhanasekaran Sengodan earned 500 total points
ID: 33483185
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:spiral2007
ID: 33483764
i did find any useful information...
0
 

Author Comment

by:spiral2007
ID: 33483771
sorry .. i didnt find any useful information ..
0
 

Author Comment

by:spiral2007
ID: 33484048
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

Open in new window

0
 

Author Closing Comment

by:spiral2007
ID: 33484056
oDoc.Bookmarks.Item("optionbuttonyes").Range.InlineShapes(1).OLEFormat.Object.value = True
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now