?
Solved

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

Posted on 2010-08-19
7
Medium Priority
?
349 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 2000 total points
ID: 33483185
0
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 

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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Integration Management Part 2
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month14 days, 13 hours left to enroll

839 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