You haven't specified where the code is failing. However if the function is throwing an error like that then there are only two possibilities:
1. There is no activedocument.
2. You are passing a bookmark name that doesn't exist in the activedocument.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|