![]() ![]() You might have to get a little more complicated if any CCs are in text boxes, frames or other odd locations. For Each CC In ActiveDocument.ContentControls. Your replies did just that and I was able to incorporate the trim aspects into my checks and calculations. This is probably all you need: Sub ClearCCs() Dim CC As ContentControl. The hurdle was test boxes that contained no text, but the presence spaces, tabs, returns, were interpreted for populated text. I know this was not clear in my original question, but I was wanting more of an idea how to accomplish 1 piece of the puzzle without having you solve the whole problem. Remove content control We will show you how to do the above in easy, step-by-step instructions. Even if you want to limit the test to particular content controls, you'd ordinarily build that logic into the self-same ContentControlOnExit macro.Įssentially, I wanted to create a macro button which did the check for specifically titled empty content controls, then display a message box given the user the count for them to review and correct. ![]() For full instructions on developing forms using Content Controls, run a search on "Create forms that users complete in Word 2007" and select the help option: Word > Creating specific documents > Forms.įor the developer perspective on Content Controls, you may want to check out this overview.It's not apparent to me why you'd need a separate function, when a ContentControlOnExit macro such as I posted can do the test without one. This is a significant new area that is well documented in the on-line help system. You can build forms using Content Controls. Content controls are ideal for creating structured documents because content controls help you fix the position of content, specify the kind of content (for example, a date, a picture, or text), restrict or enable editing, and add semantic meaning to content.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |