3 Replies Latest reply on Jun 12, 2015 6:06 AM by frameexpert

    page breaks being removed after importing table

    tracey.orso Level 1

      Hello,

       

      I am importing tables into a document on open. I have multiple tables, and each time the document is opened the tables are reimported from directory.

      The problem is that the page breaks, which sit between the paragraphs containing the tables are also being removed and I need them to stay.

       

      I have tried the following in the import params>

       

        i=GetPropIndex(importParams,Constants.FS_FormatImportedText);

         importParams[i].propVal.ival=1;

         i=GetPropIndex(importParams,Constants.FS_RemoveManualPageBreaks);

         importParams[i].propVal.ival=0;

       

      but this doesn't seem to be working.

       

      Any help appreciated.

       

      Thanks!

       

      Tracey

        • 1. Re: page breaks being removed after importing table
          frameexpert Level 4

          Hi Tracey, Can you post more of the import code so I can try it out here? Thanks. -Rick

          • 2. Re: page breaks being removed after importing table
            tracey.orso Level 1

            Hi Rick,

             

            These are what I have set currently>

             

              //and reimport the matching table filename

                                    var importParams = GetImportDefaultParams();

                                   i=GetPropIndex(importParams,Constants.FS_ImportAsType);

                                    importParams[i].propVal.ival=Constants.FV_TYPE_XML;

                                     i=GetPropIndex(importParams,Constants.FS_FileIsXmlDoc);

                                    importParams[i].propVal.ival=Constants.FV_DoOK;

                                    i=GetPropIndex(importParams,Constants.FS_AlertUserAboutFailure);

                                    importParams[i].propVal.ival=0;

                                     i=GetPropIndex(importParams,Constants.FS_DontNotifyAPIClients);

                                    importParams[i].propVal.ival=1;

                               //     i=GetPropIndex(importParams,Constants.FS_FormatImportedText);

                             //       importParams[i].propVal.ival=1;

                            //        i=GetPropIndex(importParams,Constants.FS_RemoveManualPageBreaks);

                             //       importParams[i].propVal.ival="False";

                                    i=GetPropIndex(importParams,Constants.FS_HowToImport);

                                    importParams[i].propVal.ival=Constants.FV_DoByCopy;

                                    var returnParams = new PropVals() ;          

                                    //add notification for user response to trigger set_shading

                                    Notification(Constants.FA_Note_BackToUser,  true);

                         doc.Import (doc.TextSelection.end , filename, importParams, returnParams);  

             

             

            I seem to recall testing this at some point and it being ok, but now it is not working... pretty sure nothing much changed here?

             

            Thanks!

            • 3. Re: page breaks being removed after importing table
              frameexpert Level 4

              I don't see anything that looks like it would be a problem. One possibility is to store the paragraph's Start setting before you reimport the table. Then after the import, reapply the setting to the paragraph.