Link to home
Create AccountLog in
Avatar of BradleyCleveland
BradleyCleveland

asked on

Need code for Word 2007/2010 contentcontrol event

I have added a ContentControl to a Word document.  It is a Drop Down list that I am populating with choices from an sql server database. Here is code I'm using to populate the control when the document opens and it works fine:

activedocument.contentcontrols(1).dropdownlist.add rs![Name of field]

The problem is that I want to run code based on what the user selects from this combo box. I am totally lost on how to fire off an event  from the control. The control is supposed to have an event called  ContentControlOnExit.  But how do you reference that event to make it fire. I am needing some specifiic coding here.

I need the event to fire and then be able to retrieve the value of the ContentControl in the OnExit event
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of BradleyCleveland
BradleyCleveland

ASKER

EXCELLENT!!!