The code below does this sometimes, but sometimes, a new Tab will appear in the editor. The new Tab seems to appear only after I've done a similar extract from your UI by right-clicking some pages and selected "Extract Pages".
I can write some code to immediately close the new document tab once created, but I want to figure out why sometimes a tab is create and sometimes not.
Seems like there is a missing property in the SDK that would control whether a new document is created or not, which would correspond to the "Save Extracted Pages to New File" item in your Extract Pages dialog.
Code: Select all
FControl.SetProperty('Operations.ExtractPages.RangeType', 'Exact', 0); FControl.SetProperty('Operations.ExtractPages.RangeText', APages, 0); FControl.SetProperty('Operations.ExtractPages.DeleteAfterExtract', 0, 0); FControl.SetProperty('Operations.ExtractPages.ExtractToFiles', 1, 0); FControl.SetProperty('Operations.ExtractPages.ToOneFile', 1, 0); FControl.SetProperty('Operations.ExtractPages.DestFolder', ADir, 0); FControl.SetProperty('Operations.ExtractPages.DestFileName', AName, 0); FControl.DoDocumentVerb(ADocID, '', 'ExtractPages', vIn, vOut, PXCVA_NoUI);