That seems to be the right direction, yes. You are referring to the exportFile parameter "whichDocuments":
Used to specify a list of book content references, from the current book, where the list may contain duplicate entries and if the list is not specified then the entire book contents shall be exported (Optional)
In JS, you create the array with
var docArray = new Array();
then "push" the required elements into it (... I don't think there is a VB equivalent!):
if (strDocName.toLowerCase.indexOf("_title") > -1 || strDocName.toLowerCase.indexOf("_hb") > -1)
and use this array in the export function:
myBook.exportFile (File("myOutput.pdf"), false, somePDfPreset, docArray);
k I figured out how to do this. Is there a way to preserve the page numbering. The documents I will be exporting might be page 1-3 and pages 80-120. But pages 1-3 have a TOC that will be wrong when I export as it renumbers.
iCount As Integer = 1 To myBook.BookContents.Count
strDocName = myBook.BookContents.Item(iCount).FullName
If strDocName.ToLower.Contains("_title") Or strDocName.ToLower.Contains("_hb") Then
arExportFiles(iFoundCount) = myBook.BookContents.Item(iCount)
iFoundCount = +1
Sorry, what page numbers are you referring to? I don't think it works in any other way than it does in the UI.
I was referring to the page numbers of the documents, but like you said it doesn't do anything the UI doesn't do. I was just wondering if there was a different way to do it in the UI that I was thinking of. Thanks for the reply.