From: Lauro on
Hi,

I would like to group an entire table with a wdContentControlGroup type
of Content Control to prevent editing from users except in some
wdContentControlRichText type of Content Control.

I'm having problem in passing the right Range of the table.

If I use:

With ActiveDocument
Set r = .Tables(1).Range
Set objcc = .ContentControls.Add(wdContentControlGroup, r)
End With

an error "5224" "Wrong selection" arise.

If I use:

With ActiveDocument
.Tables(1).Select
Set objcc = .ContentControls.Add(wdContentControlGroup)
End With

it's fine. Isn't strange?

Anyway, the Start Group Tag is inside the First Cell and the End Group Tag
is inside the Last Cell. I would image that should be around the table.

If I select the Content Control

Set objcc = ActiveDocument.ContentControls.Item(1)
objcc.Range.Select

Only the first column is selected.

Any advise? Thanks in advance, Lauro