locked
Why does msword split lines when saving an RTF document? RRS feed

  • Question

  • I'm using a template system based on RTF + Velocity. In my RTF's I've got several [VTL](http://velocity.apache.org/engine/devel/vtl-reference-guide.html) sentences, such as: 


        #foreach($item in $somevar.someProp)Some may-be RTF text #end

    If I open the RTF file with Word (2007) and apply any lesser change somewhere else in the document, I sometimes get VTL sentences broken : 

        #foreach($item in $somevar.som
        eProp)Some may-be RTF text #end

    This causes the template engine to choke on the sentence, and having to open the RTF with a text editor to restore the split line every time is quite annoying. Note this does not always happen, it seems to be specific on some files. It also doesn't have anything to do with line length, there are other lines longer than the one that gets split.

    Why might Word be doing this, or how could I avoid it?

    EDIT:

    Here's an example file. I can't use SkyDrive at work, so it's in GoogleDrive. Seems like the site won't let me post links, so here's the URL: 

    https://docs.google.com/file/d/0B_Pxpy6d6hsORktYOWprMDZ0eDA/edit?usp=sharing

    It seems to always break at lines 1736 and 1842. It can be reproduced if opened with MS Word 2007 (12.0.6545.5000) and any minor change is done (for instance, a blank space at the end of the document).



    • Edited by Xavi López Friday, February 22, 2013 3:24 PM
    Saturday, January 26, 2013 2:00 PM

All replies

  • As you said, it doesn't always heppen, I wasn't able to reproduce this behavior on my test machine, with some sample code from the link you provided.

    As you said, this only happen to some specific files. Will this also only happen to some specific line? Will it break every time in the same line?

    Can you share the specific files with problem? http://www.skydrive.com/ (remove anything sensitive)


    Max Meng
    TechNet Community Support

    Tuesday, January 29, 2013 1:58 PM
  • Max, I've edited the original question with a link to a sample RTF document suffering from the problem. Sorry for the delay. I'd really appreciate any thoughts on why might this be happening. Always seems to break at the same lines (if major changes are done elsewhere, lines might change).
    Friday, February 22, 2013 3:23 PM
  • This problem is still persisting and wasting my time. Has been someone able to reproduce with the attached file? 
    Wednesday, September 4, 2013 8:29 AM