Thread: [Solved] Grouping Content Controls
View Single Post
 
Old 02-21-2011, 10:36 PM
cksm4 cksm4 is offline Windows XP Office 2007
Advanced Beginner
 
Join Date: Aug 2010
Posts: 48
cksm4 is on a distinguished road
Unhappy 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)
However, I am trying to use a set range so that a selection is not visible to the user. No matter how I try this code it will not work on a set range:

Code:
 
Dim cc As Word.ContentControl
Dim rng As Range
Set rng = ActiveDocument.Range
Set cc = rng.ContentControls.Add(wdContentControlGroup)
or

Code:
 
Dim cc As Word.ContentControl
Dim rng As Range
Set rng = ActiveDocument.Range
Set cc = .ContentControls.Add(wdContentControlGroup, rng)
HELP!

Thanks
Brock
Reply With Quote