Solved

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

Posted on 2010-08-19
7
328 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 500 total points
ID: 33483185
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 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