Saving as RTF stopped working in new WPTools version

  • I'm having a problem with the newest version of WPTools.

    I keep all of my documents in WPT format and then save them as RTF using RTFNoBinary (so Word can open them with images) when needed. Everything worked perfectly in 5.20.6. I upgraded to 5.20.8 and now I am having problems. Some documents won't open in Word, is says they are corrupt.

    The following is an example of a WPT document that will open in Word when exporting to RTF from 5.20.6, but will not open in Word when exporting to RTF from 5.20.8.

    Here is the original WPT code:

    • Offizieller Beitrag

    I love it! it seems so that Word has a problem with simple bullet styles inside of a cell.

    If you open the file WPIOWriteRTF you can locate the code

    {--$IFDEF SIMPLE_AS_OLDPN}
    or (NumberStyle.Group = 0) //V5.20.7a
    {--$ENDIF}

    change that to

    {$IFDEF SIMPLE_AS_OLDPN}
    or (NumberStyle.Group = 0) //V5.20.7a
    {$ENDIF}

    and it works as before.

    Regards,

    Julian

  • Thanks Julian, that worked.

    Is this a change I am going to need to make after I upgrade to each version WPTools or is the next version of WPTools going to handle this differently? Or maybe there will be a compiler flag that can be set in WPINC.INC?

    Thanks.

  • I an different post I noted this new code

    Code
    if (soSaveOldPNNumbering in FStoreOptions) 
            {$IFDEF SIMPLE_AS_OLDPN} 
              or ((NumberStyle.Group = 0) //V5.20.7a 
                  and (not (ParStyle is TParagraph)  //V5.20.8b - Word does not allow those styles in cells! 
                       or (TParagraph(ParStyle).Cell=nil))) then
            {$ENDIF} 
            then

    so, yes, you can $define SIMPLE_AS_OLDPN in WPINC.INC or, in your case not define it.