Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Hi Tracey, Can you post more of the import code so I can try it out here? Thanks. -Rick
Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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.