View Single Post
  #15   Report Post  
Posted to microsoft.public.word.docmanagement
Big Dave Big Dave is offline
external usenet poster
 
Posts: 24
Default Putting frames into content controls forces extra paragraphs.

Looking at the WordML, even adding a CC to a multi-cell table doesn't end up
with the CC surrounding the table

w:tbl
w:tblPr.../w:tblPr
w:tblGrid.../w:tblGrid
w:sdt (the CC)
...
w:tr
w:tc
/w:tc
/w:tr
/w:sdt
/w:tbl

It does behave differently, i.e. if you manually select the CC and 'cut' it,
the whole table disappears, but if you do it via code, when you do a select: -

ActiveDocument.ContentControls(1).Range.Select

(there was only 1 control) it only selects the first cell, not even the two
cells the CC spans. Oh dear, oh dear...

--
Big Dave UK x


"Big Dave" wrote:

Gosh, no need to apologise! You here out of the kindness of your heart (my
understanding is you don't get paid for posting here?) - any help is greatly
appreciated!

Well, I've tried the floating cell, and it fixes one problem, but
unfortunately it's the same problem frames fix and then you still get the
frame related problem if you use a single cell, which I would be.

To add a content control around the cell, not within it, you have to include
the paragraph that the cell is linked to. In this case it works slightly
differently to frames, because there seems to be no 'anchor' just the 'link',
i.e. where the flow of text continues from. It's like they dropped the
anchor, even though it's useful to know what paragraph you're linked to,
especially when a possibile positioning parameter is Vertical Position
Relative to Paragraph.
There's some weird behaviour when using arrow keys to move the cursor around
the paragraph the cell is linked to...

It's very annoying and yet another thing that, as far as I am concerned, is
a bug. Why should a one-cell table work differently to a two-cell table?

I may be able to use this as a workaround, though - I could just use
two-cell tables and have one very small cell - I'll play with that and see
what happens.

I shouldn't complain, I guess - it's these kind of things that keep me in a
job - if it worked fine, anyone could develop with Word!

--
Big Dave UK x


"Cindy M." wrote:

Hi ?B?QmlnIERhdmU=?=,

Would this
be worth passing on?: -

If the table cell approach doesn't give you what you need,
yes, definitely.

And sorry my brain took so long to come up with that. For
some odd reason, your saying I suggested frames triggered
that. Comes from interpreting what people ask literally;
sometimes takes a "kick" to get me thinking beyond the
stated problem.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)