ContentControl.Range.ContentControls.Count == 0

D

David Thielen

Playing with it some more it looks like the Range for a content
control and field should then set Start-- and End++ - is this safe to
do?

I'm guessing that it has some begin/end character that are not
included in the Range for some reason, but are needed to fully get
that object.

thanks - dave


What is going on here? SHouldn't the ContentControl.Range have 1
control in it's ContentControls collection.

Same issue with Field.Code/Data - create a Range that includes both
and Range.Fileds.Count == 0.

Any ideas?

thanks - dave

david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
D

David Thielen

I hadn't thought of it as the Range of the content - I guess that
makes sense. I wish they had had a property for the Range of the
entire control (and for fields too). But this does work well and with
your explination it makes sense.

thanks - dave


Hello Dave,

Yes, it is safe and supposed to get the range like that way.

Actually, the ContentControl.Range returns the contents of the content
control. It is the inner range of the contents.

http://msdn.microsoft.com/en-us/lib...rop.word.contentcontrol.range(office.14).aspx

So unless, you have an nested content control in it, you will always get 0
for ContentControl.Range.ContentControls.Count


Best regards,
Ji Zhou
Microsoft Online Community Support


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top