Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-11-27
1
Medium Priority
?
616 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
1 Comment
 
LVL 76

Accepted Solution

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

strOriginal = word_cc.Range.Text

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
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!
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
Suggested Courses

916 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