How to Fix Missing Parent and Child PDF Bookmarks in SAS VBScript
Question details
The user needs to resolve an issue where a SAS-generated VBScript using Adobe Acrobat automation fails to display parent and child bookmarks when combining PDF files.

- Product
- SAS, VBScript, Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Combining PDF files and generating hierarchical bookmarks automatically using SAS and VBScript.
- Observed behavior
- The resulting combined PDF fails to display the intended parent and child bookmark structure.
Review your SAS macro and VBScript code for any syntax errors or broken logic in the bookmark generation API calls before seeking external assistance.
Consult the SAS Support Communities
Because this involves highly specialized SAS, VBScript, and Acrobat automation logic, getting an expert review of your specific code is the most effective approach.
PDF combination and bookmark generation via script require precise API calls. A minor error in the object hierarchy mapping within the VBScript can cause child bookmarks to be discarded or flattened.
Collect your SAS macro code, the Acrobat automation VBScript output, and a clear explanation of your intended PDF bookmark structure.
Navigate your web browser to the official SAS Support Communities website (communities.sas.com).
Create a new topic describing how the logic used to create parent and child bookmarks is failing. Include your code snippets and PDF structure details for community experts to review.

Manually Combine and Edit PDF Bookmarks with WPS Office
If automated scripting becomes too complex or fails to yield the correct bookmark hierarchy, you can quickly combine PDF files and manually structure parent and child bookmarks using WPS Office's built-in PDF editor.
- 1. Open WPS Office PDF: Launch WPS Office and open the primary PDF file you wish to structure.
- 2. Merge PDF Files: Go to the 'Page' tab and select 'Merge PDF' to easily combine your separate PDF documents into a single file.
- 3. Open the Bookmark Pane: Click on the Bookmark icon on the left-hand navigation pane to view the current document structure.
- 4. Add and Arrange Bookmarks: Right-click in the pane to add new bookmarks. Drag and drop a bookmark slightly to the right under another bookmark to create a parent-child relationship, then save your file.

Frequently Asked Questions
Why do PDF bookmarks disappear when merging files via script?
When merging PDFs using automation scripts, the object hierarchy of the original bookmarks is often broken or overwritten if the script does not explicitly read, retain, and systematically rewrite the parent-child node logic.
Can I create hierarchical PDF bookmarks without using VBScript?
Yes. You can manually create and organize parent and child bookmarks using the bookmark panel in PDF editors like WPS Office by dragging child bookmarks underneath parent ones.
What information is needed to troubleshoot Acrobat VBScript errors?
To properly troubleshoot scripting errors, experts need the exact VBScript logic interacting with the Acrobat API, the SAS macro generating the script, and an outline of the intended document structure.




