locked
[Solved] Text in programmatically generated Word file doesn't wrap RRS feed

  • Question

  • Hi,

    I'm having an issue with a Word file that I can't seem to fix. You can download the file in question here:

    http://www.2shared.com/file/y4Dihqcb/Text_wrapping_issue.html

    As you can see, the first line extends beyond the margins of the page. This text isn't contained within a table, it is just text on an otherwise empty page.

    The text in question was populated by data stored in a database, however it's not clear what I need to do to fix it once it's on the page. Can anyone advise me on what I need to do to make the text wrap correctly?

    Thank you,

    Tom
    • Edited by T Clarke Monday, December 21, 2015 2:18 PM
    Monday, December 21, 2015 12:33 PM

Answers

  • If you view the Paragraph Settings dialog, you'll see that the right page indent has been set to a large negative amount:

    You can correct this by setting the right indent to 0. If you want to do this using VBA:

    ActiveDocument.Content.ParagraphFormat.RightIndent = 0


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Monday, December 21, 2015 12:49 PM

All replies

  • If you view the Paragraph Settings dialog, you'll see that the right page indent has been set to a large negative amount:

    You can correct this by setting the right indent to 0. If you want to do this using VBA:

    ActiveDocument.Content.ParagraphFormat.RightIndent = 0


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Monday, December 21, 2015 12:49 PM
  • Thank you Hans, your solution worked perfectly.
    Monday, December 21, 2015 2:18 PM