Can Acrobat Email Form JavaScript Make One Word Bold?
Question details
The user wants to know if it is possible to use Acrobat's mailDoc JavaScript to format a specific word in bold within the body of an email message generated from a PDF form.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating a PDF form with a JavaScript button that triggers an email draft, where the user needs rich text formatting (like bolding a single word) in the email message body.
- Observed behavior
- The native mailDoc JavaScript function only outputs plain text, failing to render any rich text or HTML formatting applied to the message string.
Before attempting to modify your PDF form scripts, note that native PDF JavaScript interacts with the system's default email client in a strictly plain text format to ensure universal compatibility.
Understand mailDoc Plain Text Limitations
Acrobat's built-in mailDoc function does not support rich text or HTML formatting, making it impossible to bold a single word.
The mailDoc function's cMsg parameter is designed to send plain text strings to your default email client via simple protocols like MAPI or mailto.
Because it strips out any HTML tags or rich text formatting, you cannot make one word bold using this specific native Acrobat JavaScript method. Any HTML tags included will simply be displayed as raw text.
Launch your PDF form in Adobe Acrobat and navigate to the 'Prepare Form' tool.
Right-click the button used to send the email and select 'Properties' from the context menu.
Go to the 'Actions' tab, select your 'Run a JavaScript' action, and click 'Edit'. Note that any app.mailMsg() or doc.mailDoc() scripts here will only ever produce plain text.

Alternative Workaround: Use Server-Side Scripts
To send formatted emails from a PDF, bypass the local email client by submitting the form data to a web server instead.
Manage and Fill PDF Forms Efficiently with WPS Office
While advanced JavaScript email limitations apply universally across standard PDF viewers, WPS Office provides a free, lightweight, and highly compatible alternative for everyday PDF editing, form filling, and document management without the burden of expensive subscriptions.
- 1. Download the installer: Visit the official WPS Office website and download the free version for your operating system.
- 2. Install the software: Run the setup file and follow the on-screen instructions to complete the installation.
- 3. Open your PDF: Launch WPS Office and open your PDF document to seamlessly fill forms, add annotations, and manage pages.

Frequently Asked Questions
Can I use HTML tags in the mailDoc JavaScript function?
No. The mailDoc function strictly processes and outputs plain text. If you include HTML tags like <b> or <i> in the script, they will appear as visible, raw text in the resulting email draft.
Why doesn't the Acrobat email JavaScript support rich text?
The JavaScript function uses standard protocols to pass data to your computer's default email client. To guarantee that the data passes successfully to any email application (Outlook, Apple Mail, Thunderbird, etc.), it is restricted to universally accepted plain text.
Are there other PDF viewers that can send HTML emails via local JavaScript?
Standard PDF JavaScript implementations restrict local email generation to plain text across almost all major PDF viewers for security and cross-client compatibility reasons.
What is the best way to send a rich text email from a PDF form?
The most reliable method is to configure your PDF form button to submit data to a web server. A server-side script can then compile the data into an HTML-formatted email and send it with full rich text support.




