Welcome back and thanks for requesting me.
Could you send me any files you have so that I can fully understand the question? You can upload them to http://www.wikisend.com/ - Just need the File ID or URL after you upload the file(s).
Do you have the FIle ID or URL for it?
It might be possible but if you had a sample to work with, it would be great.
Let me know if you need anything else or have questions.
Do you have either Acrobat Standard or Pro?
I have Acrobat Pro
Great, thanks. How would you like to work out the renaming? Would you like it to just ask you a new name for each tab?
The pdf file created by excel is going to be run many times as it is a template where data is changed with different clients. The name of the Workbook tabs and the Longer Name are both fixed. For example, bookmark "One" would have a name much longer such as "Overall Analysis Page One Facility Side-By_Side Comparison". So, it would be best if the program was set up to recognize the old Bookmark name, and replace with the fixed string text.
There may be as many as 25-30 bookmarks. Once I see how the code is written, I am hoping that I could revise it. At the moment, I am looking at just the top level. I am also interested in learning how to add one layer to the bookmarks. Then, I just need to figure out the best approach to run the code.
Perfect. I will setup a few and you will be able to copy/paste to add more.
Great. I have it setup as an action for you. Which means all you would have to do is open the PDF, go to Tools then Actions and then click Rename Bookmarks (then start). Here is the file: http://www.wikisend.com/download/488312/Rename%20Bookmarks.sequ
If you are not familiar with actions, just double-click that file and Acrobat will ask if you want to import the action. Once you have it imported, you should see it on the right under Tools, Action Wizard.
err, Specify Settings, not properties.
You'll see the script. It's pretty simple and hopefully you are able to understand it. The only thing you really need to change is to keep adding case statements. As you will see, there are already four there (0-3). Make sure to add new ones ABOVE the default line.
As far as the default case, it will ignore any numbers you dont have listed. So, as an example, if you wanted it to skip bookmark 5 (case 4), just don't put a case 4 in and it will ignore it.
Did you have a chance to try this out?
Going to try this out now. I got caught up with work.
How do you actually run the code?
Oh, do you just double click on the action Name? Just curious, is there a way to make an action like this run automatically when a pdf is opened?
No, that won't be possible.
Did it work for you?
So you cannot run an action automatically when opening a pdf.
Definitely worked. It is awesome.
Perfect. Glad it worked. Do you understand the code to be able to expand it yourself?
Yes. I though it was possible to expand the Root Bookmarks and have others under them. In your code, I am guessing "bm.children.name " refers to the root bookmark. do you know offhand what a bookmark falling under this would have for syntax?
bm is the root, .children refers to the nth instance of a bookmark (or child).
.name is XXXXX XXXXX
Basically, the children are the actual bookmarks
.name refers to the name of it.
There are probably other things you could get/set like where it links to (what page, etc)
Here you go: http://www.verydoc.com/documents/acrojsguide/pg_0172.htm
Those are the properties you can get/set
If you wanted a sub-bookmark, you would want another for loop (different variable) and loop though bm.children.children (and reference bm.children.children[x].name - assuming the new for loop used x
So if you had something like this. BM1 followed by subcategories BM1a and BM1b, then BM2 followed by subcategories BM2a and BM2b. Would the i just increment straight down so that BM1=1 BM1a=2 , etc?
If that makes sense
BM1 would essentially be bm.children, BM1a would be bm.children.children
BM1b would be bm.children.children
Does that make sense?
The for loops just make it easier than specifying them manually
Ohh. so children is like the first level. Then you just add .children[#] to it for another level. Yes this makes sense. I think we are good to go. Thanks for all your help.
Glad I could help!
I hope I have been helpful in today's session. It has been a pleasure working with you. Please be sure to rate the service you received today. You may also provide a tip after rating, if you feel I deserve one (thank you in advance!). Should you wish to request me in the future, you can bookmark/favorite my profile page by clicking my name on the left. Have a great rest of your day.