Feature Summary

The WPS Macro Editor is a built-in automation programming tool in WPS Office that supports the JS language. It helps users automate document processing by writing scripts, greatly improving office productivity.

Feature Description

Feature Dimension Description
Membership Restriction No membership restriction
Version Restriction No version restriction

Operation Steps

Opening the JS Macro Editor

Function Entry
"Tools" tab → "Developer Tools" tab → "WPS Macro Editor" button

  1. Click the Developer Tools button in the Tools tab
  2. Enter the Developer Tools tab and click the WPS Macro Editor button
  3. In the Macro Editor, click "Insert" → "Module" at the top
  4. Write JavaScript code in the JS module

image

image

FAQ

Q1: Can I switch to the VBA editor in WPS for Mac?

  • Solution: Not currently supported. WPS for Mac currently only supports the JS editor. You can choose to rewrite the macro in the JS editor according to JavaScript code requirements.

Q2: Unable to save macro code

  • Solution: Documents containing macros must be saved in a macro-enabled format. WPS Writer documents need to be saved in the .docm format; files in the .docx format cannot save macro code. You can save the file in the .docm format using Save As.

Notes

  1. File Format Requirements: Documents containing macros must be saved in a macro-enabled format (.docm, .wpm, .xlsm, .et, etc.). Standard formats cannot save macro code.
  2. Security Risk: Avoid executing macro script files from unknown sources to reduce security risks.