Skip to main content
Known Participant
June 2, 2015
Question

page breaks being removed after importing table

  • June 2, 2015
  • 3 replies
  • 415 views

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.propVal.ival=1;

   i=GetPropIndex(importParams,Constants.FS_RemoveManualPageBreaks);

   importParams.propVal.ival=0;

but this doesn't seem to be working.

Any help appreciated.

Thanks!

Tracey

This topic has been closed for replies.

3 replies

frameexpert
Community Expert
Community Expert
June 2, 2015

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

www.frameexpert.com
Known Participant
June 11, 2015

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.propVal.ival=Constants.FV_TYPE_XML;

                         i=GetPropIndex(importParams,Constants.FS_FileIsXmlDoc);

                        importParams.propVal.ival=Constants.FV_DoOK;

                        i=GetPropIndex(importParams,Constants.FS_AlertUserAboutFailure);

                        importParams.propVal.ival=0;

                         i=GetPropIndex(importParams,Constants.FS_DontNotifyAPIClients);

                        importParams.propVal.ival=1;

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

                 //       importParams.propVal.ival=1;

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

                 //       importParams.propVal.ival="False";

                        i=GetPropIndex(importParams,Constants.FS_HowToImport);

                        importParams.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!

frameexpert
Community Expert
Community Expert
June 12, 2015

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.

www.frameexpert.com