Some information missing here:
- Do you want to do this to all bookmarks, or just some (say, only the top-level ones)?
- Which page(s) should be included in the newly split file? The page the bookmark is pointing to? All of the pages until the next bookmark? Something else?
- Which folder should be used for the new files? The same as the original one?
- What should happen if the bookmark name can't be used as a file-name (if it contains illegal characters, for example, or is a duplicate of another file)?
Sorry about the lack of info, I was still looking for a solution on other sites, so:
a. only top level one
b. until next bookmark
c. the same as the original one
d. Not possible, the names are unique since they contain a sequence number and one or more names.
To clarify point d: The doc name is 1234002. In this doc, a para style is used, called AM_NL which is used every time we encounter a sentence starting with "Nr. (followed by a sequence number) van de heer XXXX (or van de heren XXXX en YYYY...)". In doc 1234002 this number can appear only ones.
This kind of code was posted to these forums many times in the past.
Basically you need to use a loop to iterate over the bookmarks, executing
each one and then using the current page number information to determine
the page range for each bookmark, and then extract it as a new file.
In the past this process didn't work as a part of an Action, but I believe
that was fixed recently.
On Mon, Oct 26, 2015 at 2:15 PM, gert verrept <firstname.lastname@example.org>