#1
|
|||
|
|||
Grouping Content Controls
I am really in need of help on this one! I want to group content controls. Easily done by using:
Code:
Selection.Range.ContentControls.Add(wdContentControlGroup) Code:
Dim cc As Word.ContentControl Dim rng As Range Set rng = ActiveDocument.Range Set cc = rng.ContentControls.Add(wdContentControlGroup) Code:
Dim cc As Word.ContentControl Dim rng As Range Set rng = ActiveDocument.Range Set cc = .ContentControls.Add(wdContentControlGroup, rng) Thanks Brock |
#2
|
||||
|
||||
Hi Brock,
See: http://social.msdn.microsoft.com/For...-61b9d32967e4/ Intersetingly, your second code snippet works for me provided a content control is selected. If you need to work with selections, you can use 'Application.ScreenUpdating = False' to hide what you're doing from the user and, if you set a range to the user's selection before making any selections with your own code, then re-select that range afterwards, the user need never know the selection had changed in the interim.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
I guess this will show my limited, but growing knowledge... 'Application.ScreenUpdating = False' is a new find me me. What a great command... thanks!!
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Grouping text boxes | daviddoria | PowerPoint | 1 | 07-26-2010 06:12 AM |
Package for CD with links to Windows media player content and Flash Shockwave content | hectorh | PowerPoint | 4 | 10-15-2009 12:22 PM |
Grouping - expand all | ejohns | Excel | 0 | 07-17-2009 07:15 AM |
Can't Download Controls | BillTheAdmin | Project | 2 | 12-05-2005 10:20 AM |
How to do grouping in Excel | volcane | Excel | 2 | 04-30-2005 09:23 PM |