When using Switching VB/JS Macro Environment, common questions usually involve when the setting takes effect, code compatibility, and platform limits; this FAQ includes 4 common questions and a glossary.
FAQ
I set the default JS environment, but the VB editor still opens. What should I do?
- Open File → Options → View.
- Confirm that Default JS Development Environment is selected.
- Restart WPS and open the macro editor again.
Can my existing macro code still run after I switch environments?
- Switching the macro environment does not remove saved macro code.
- Switch back to the matching environment when you need to run existing code.
- Before running the code, confirm that the current editor matches the macro environment used by that code.
Where can I use VBA macros?
- The VBA macro workflow described here is for Windows.
- Make sure the VBA plugin is installed before using VBA macros.
- This VBA usage path is not available in the same way on macOS, Linux, or mobile.
Why should a document with macros be saved as .docm?
- Macro content should be stored in a macro-enabled document format.
- Choose the
.docmformat when saving the document. - Reopen the file after saving and confirm that the macro content is still available.
Glossary
| Term | Definition |
|---|---|
| VBA | Visual Basic for Applications, a macro language environment commonly used for Office document automation. |
| JS macro | A JavaScript-based macro approach used for automation in WPS. |
| Macro environment | The development environment used to edit, run, and manage macro code. |
.docm | A macro-enabled Word document format used to preserve macro content in a document. |