How to Make LiveCycle Form Fields Read-Only Using VBA
Question details
The user wants to automate the process of making PDF form fields read-only in an Adobe LiveCycle form using VBA.

- Product
- Adobe LiveCycle and Acrobat
- Device & OS
- not provided
- Scenario
- Attempting to change the read-only state of PDF form fields via VBA automation or JavaScript.
- Observed behavior
- Standard Acrobat JavaScript or VBA field properties fail to control the read-only state because the form uses XFA technology, which requires specific DOM scripting methods.
Verify whether your PDF document is a standard AcroForm or an XFA form created in LiveCycle Designer, as standard VBA scripts will not work on the XFA architecture.
Seek Assistance in the Adobe Experience Manager Community
Since XFA forms require LiveCycle-specific methods, the best resource for exact VBA and JavaScript syntax is the official Adobe community.
LiveCycle forms use XML Forms Architecture (XFA). Standard Acrobat VBA field properties cannot directly interact with XFA fields in the same way they do with standard PDF forms.
To properly automate these forms, you need specialized XFA scripting knowledge and a compatible Adobe Experience Manager (AEM) environment.
Open your web browser and go to the Adobe Experience League Communities.
Locate and select the Adobe Experience Manager forum section dedicated to forms and LiveCycle.
Create a new post asking for syntax help. Be sure to include your XFA form structure, field binding details, your current VBA code, and the exact Acrobat or LiveCycle version you are using.

Convert XFA Forms to Standard AcroForms
If you do not strictly require dynamic LiveCycle features, converting the form to a standard PDF allows standard VBA and JavaScript to work.
Manage and Flatten PDF Forms Easily with WPS Office
Avoid the complexities of proprietary XFA scripts and VBA debugging by using WPS Office to manage standard PDF forms. You can easily fill out forms and permanently flatten them to make all fields read-only in just a few clicks.
- 1. Open the PDF Form: Launch WPS Office and open your standard PDF form document.
- 2. Fill Out the Fields: Click on the interactive form fields to input your data as needed.
- 3. Access the Print Menu: Go to the 'Menu' in the top-left corner and select 'Print'.
- 4. Print to PDF: Choose a 'Print to PDF' virtual printer from your printer list to flatten the document.
- 5. Save the Read-Only Document: Click 'Print' and save the new file. All interactive form fields will be permanently converted to static text, effectively making them read-only.

Frequently Asked Questions
Why doesn't standard Acrobat JavaScript work on LiveCycle forms?
LiveCycle forms are built using XML Forms Architecture (XFA) rather than standard AcroForm dictionaries. XFA uses a fundamentally different structure and requires specific DOM scripting methods that standard Acrobat JavaScript and VBA do not natively support.
Can WPS Office edit LiveCycle XFA forms?
WPS Office is highly optimized for standard PDF forms (AcroForms). Highly complex, dynamic XFA forms created in LiveCycle Designer may require conversion to standard PDFs before they can be fully edited or flattened.
How can I check if my PDF is an XFA form?
Open the PDF in a standard reader. If you see a placeholder message stating 'Please wait... If this message is not eventually replaced by the proper contents of the document', or if standard form editing tools are grayed out, the file is likely an XFA form.
What is the quickest way to make a PDF read-only without using VBA?
The fastest method is to 'flatten' the PDF. You can do this by using the 'Print to PDF' function or an 'Export to Image' feature in your PDF editor. This converts all interactive form fields into static visual elements.




