Adjust Shape size to text content (Word) RRS feed

  • Question

  • Cindy

    is this the reference you refer to:   ?

    i have a new problem, should i start a new thread?

    in the openxml document in the code, there is a title.  i need a shape block to move/adjust with how much text happens to be there, to adjust based on size;  then there is a table that only needs as many rows as it needs

    when the content controls are filled, the word doc then needs to adjust, here is what the resulting doc looks like:

    so the first image here, the text is inserted by content controls just fine, but if the text runs too long? the shapes fall apart, how is this fixed??

    Thursday, July 23, 2015 1:27 PM


All replies

  • just made a table with invisible borders.  works perfect.  probl solved
    Thursday, July 23, 2015 2:18 PM
  • Hi Bradley

    <<i have a new problem, should i start a new thread?>>

    Yes, that would better :-) I'm not always "here", so that ensures someone will see it. Also it's helpful for others who have a similar problem and could profit from the discussion. I'd like to split this new question off, if that's OK with you?

    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, July 23, 2015 4:40 PM
  • Hi Bradley

    This is the reference, scroll down the list to the members that start with: sdt

    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, July 23, 2015 4:41 PM
  • Hi Cindy

    yes by all means, format the thread as you like.

    i have tried and tried and tried, cannot make word see the CRLF.  in the plaintext box i filled with data from almost 20 database entry items in one paragraph, in the plaintext box? fine.  lined up, carriage returns, the bullets are boxes with thin lines.  In word? when put into the word doc content controls, they just go with no carriage return, looks terrible for a report, its got to be bulleted.  there has to be some kind of escape sequence to tell word to put the crlf in there.  word ignores 0xa and 0xc and 0xd, and attempts to copy the magic crlf char


    Friday, July 24, 2015 2:53 AM
  • Hi Bradley

    Thanks for posting a new question concerning new lines. I'll answer that there and consider this (new, spilt) thread as closed.

    Cindy Meister, VSTO/Word MVP, my blog

    Friday, July 24, 2015 3:30 PM