logo
search
Others

How to Fix Missing Parent and Child PDF Bookmarks in SAS VBScript

Khadija KhanKhadija Khan Sep 27, 2026 869 views

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.

WPS pdf open app — search bookmarks and navigate PDF pages
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.
Before you start

Review your SAS macro and VBScript code for any syntax errors or broken logic in the bookmark generation API calls before seeking external assistance.

Solution 1Recommended

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.

1
Gather your code and files

Collect your SAS macro code, the Acrobat automation VBScript output, and a clear explanation of your intended PDF bookmark structure.

2
Visit the SAS Communities

Navigate your web browser to the official SAS Support Communities website (communities.sas.com).

3
Post a detailed question

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.

WPS pdf open app — search bookmarks and navigate PDF pages
Provide Detailed Examples: Providing clear, reproducible examples of your intended bookmark hierarchy will significantly speed up the troubleshooting process by community experts.
Easy PDF Management

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. 1. Open WPS Office PDF: Launch WPS Office and open the primary PDF file you wish to structure.
  2. 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. 3. Open the Bookmark Pane: Click on the Bookmark icon on the left-hand navigation pane to view the current document structure.
  4. 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.
Easily merge multiple PDF documents without writing complex VBScript code.Intuitive drag-and-drop interface to add, rename, and arrange parent and child bookmarks.Fully compatible with standard PDF formats, Adobe Acrobat files, and Microsoft Office document exports.Lightweight and completely free alternative for standard PDF editing tasks.
microsoft office alternative - wps office

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.