?
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
?
337 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

770 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