Solved

How to get the original value from a ListBox control in the ContentControlListEntries in Word 2010

Posted on 2010-11-27
1
599 Views
Last Modified: 2012-05-10
I have this simple loop


                                foreach (Word.ContentControlListEntry ddle in word_cc.DropdownListEntries)
                                {
                                    item.FROM_VALUE = ddle.Text;
                                    if (ddle.Value == item.TO_VALUE)
                                    {
                                        ddle.Select();
                                        break;
                                    }
                                }

I'm looking to retrieve the original value of the control before I alter it, so I can set it back as it was if I need to.

.Text return the default value.
.Value returns the value of each possible choice
I need to know the currently selected choice.

Thanks.

Previous questions on the same thread...
http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Word/Q_26641105.html

http://www.experts-exchange.com/Programming/Languages/.NET/Visual_CSharp/Q_26641446.html


test2.docx
0
Comment
Question by:gswitz
[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
1 Comment
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 34224922
You can use the Range of the control:

strOriginal = word_cc.Range.Text

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.

628 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