This how-to guide includes 4 topics, all available without membership, so you can learn how to open the editor, write scripts, save macro-enabled files, and understand the macOS editor limitation.
How-to Index
| # | Topic | Membership |
|---|---|---|
| 1 | 1. Open the JS Macro Editor | Free |
| 2 | 2. Insert a module and write JavaScript code | Free |
| 3 | 3. Save the document in a macro-enabled format | Free |
| 4 | 4. Confirm the editor type limitation on macOS | Free |
How-to Guide
1. Open the JS Macro Editor
Entry point: Tools → Developer Tools → WPS Macro Editor
- Open a document in WPS Office.
- Click Developer Tools under the Tools tab.
- In the Developer Tools tab, click WPS Macro Editor.
- Wait for the Macro Editor window to open.
Success Criteria
- UI state: The Macro Editor window opens successfully.
- Next actions: You can continue by inserting a module or entering script code.
Tips While Using
- Common mistakes: If you do not open the Developer Tools area first, the Macro Editor button may be hard to find.
2. Insert a module and write JavaScript code
Entry point: Top menu bar in Macro Editor → Insert → Module
- In the open Macro Editor, click Insert on the top menu bar.
- Select Module.
- Enter JavaScript code in the new JS module.
- Continue editing the script as needed.
Success Criteria
- UI state: An editable module area appears in the editor.
- Next actions: You can continue entering, revising, and saving script content.
Tips While Using
- Common mistakes: If you do not insert a module first, there may be no proper place to hold the script content.
- Environment limits: The script should follow JavaScript syntax.
3. Save the document in a macro-enabled format
Entry point: File → Save As
- After finishing the macro code, click File.
- Select Save As.
- Choose a macro-enabled format in the save type options.
- For WPS Docs files, save as
.docmwhen applicable. - Complete the save process.
Success Criteria
- UI state: The file is saved in a macro-enabled format.
- Next actions: When you reopen the file, the macro code can remain available.
Tips While Using
- Common mistakes: If you save the file as
.docx, the macro code cannot be saved.- Environment limits: Different document types should use their corresponding macro-enabled formats, such as
.docm,.wpm,.xlsm, and.et.
4. Confirm the editor type limitation on macOS
Entry point: General usage check
- Open WPS Macro Editor on macOS.
- Check which editor type is available.
- If you need to write macros, organize the script in JavaScript syntax.
- If you already have VBA logic, rewrite it for the currently supported editor language.
Success Criteria
- UI state: You have confirmed that the JS editor is the available editor on macOS.
- Next actions: You can continue writing or adjusting macro logic in JavaScript.
Tips While Using
- Common mistakes: Pasting VBA syntax directly may not work as expected.