![]() The the dependent (clone or secondary) controls are locked to prevent users from directly editing content. Each of the content controls is locked to prevent deletion. I say thank you Jeff for sharing your baby with me!!įor the discussion, I'm using a Word 2010 document containing content controls as shown in the following illustration. Jeff says that his "baby sub-routine" appears "all grown up" in the solution demonstrated here. With Jeff's concurrence I have expanded the scope of his monitoring procedure to detect and trigger custom OnEnter and OnExit events. ![]() Both assisted in this effort with solutions to several nagging problems in the code.Īt the time of this writing Jeff's procedure is unpublished and part of a larger custom application that he is developing. I would also like to mention and offer my appreciation to two regular contributors in the Microsoft Answers forum "HansV" While I was wondering and grousing, Jeff devised a relatively simple VBA procedure that continually monitors the active content control's range and when any change occurs triggers a call to another procedure that can evaluate and process the change. Without his skills and his willingness to share the fruits of those skills, this tips page would still be unpublished and gathering dust.Įver since content controls were introduced in Word 2007 I have wondered over, sought after, and frequently groused about why Microsoft has failed to provide a built-in "Document_ContentControlOnChange" event. Jeff participates in the Microsoft Office Word for Developers forum. Using this method, you can avoid that bug and any text or changes that your document users make in content controls can be evaluated and processed in real time, thus eliminating the need for the document user to first "exit" a content control.īefore going any further I want to give some credit where credit is due. While the built-in Document_ContentControlOnEnter and Document_ContentControlOnExit events have improved with the release of Word2010, there remains a persistent bug in the Word2007 OnExit event. This Microsoft Word Tips & Microsoft Word Help page introduces and demonstrates a method that you can use to create "custom" content control "On Enter, OnChange and OnExit" events using VBA procedures.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |