• Link to X Link to X Link to X
  • Link to Facebook Link to Facebook Link to Facebook
  • Link to Youtube Link to Youtube Link to Youtube
  • Link to Reddit Link to Reddit Link to Reddit
  • Link to Rss Link to Rss Link to Rss
  • Blog
  • Support
    • FAQ
    • Help (HTML)
    • Manual (PDF)
    • Forums (read-only)
    • Library (GitHub)
    • Update/Resend Registration Keys
    • Contact Us
  • About
    • About Emurasoft
    • Meet the Team
    • Other Products
    • Awards
    • Privacy Policy
    • Go to Emurasoft Customer Center
  • 🌐 English
    • 日本語
    • 한국어
    • Deutsch
    • 简体中文
    • 繁體中文
  • Download
  • Buy
  • Features
  • Menu Menu

Automate Your Work with Macros

EmEditor’s macro feature helps you automate tasks, streamline workflows, and boost productivity through a flexible and robust scripting system. With support for both JavaScript and VBScript, macros in EmEditor are versatile, allowing you to automate everything from simple text transformations to complex, multi-step operations. Videos demonstrating macros can be viewed at the bottom of this article.

Flexible recording and execution

Creating your first macro is as simple as clicking the red Start Recording 🟥 button in the toolbar. Record your actions, click Stop Recording when finished, and instantly generate a script that can be reused. Macros can be executed from the Macros menu or Macros toolbar.

To display the macro toolbar, right-click on any toolbar and enable the Macros toolbar. This provides easy access to built-in and user-defined macros.

The My Macros tab of the Customize Macros dialog further enhances management. From this interface, you can add, remove, and reorder your macros. It also allows you to configure macros to run automatically based on specific triggers, providing an even deeper level of automation.

Run macros with temporary options

Need to run a macro on multiple documents or repeat it a set number of times? The Run with Temporary Options feature allows you to do just that. Simply select your macro, customize options like “Run the macro against each opened document,” and add the documents you want to process. This is perfect for batch operations or repetitive tasks.

Choose Your Scripting Engine

EmEditor supports two JavaScript engines: JScript and the modern V8 engine.

The V8 engine provides compatibility with the latest ECMAScript standards, such as async/await, Promises, fetch, Set, Map, and more. It leverages Microsoft Edge to deliver cutting-edge performance and expanded syntax support. The V8 engine makes it possible to integrate advanced features like asynchronous HTTP requests, enabling you to build macros that connect to external APIs or services.

Switching between engines is easy—select your preferred engine in the Customize Macros dialog or specify it within the macro file using the #language directive.

Trigger macros with events

EmEditor macros can be triggered automatically based on specific events. In the My Macros tab of the Customize Macros dialog, you can configure macros to execute automatically when a document is opened, saved, or modified.

Assign macro to keyboard shortcut

To assign a macro to a keyboard shortcut, navigate to Tools > Properties for Current Configuration (or All Configurations) > Keyboard. Under the My Macros category, select your macro, type a new shortcut in the field, and assign it. This allows you to execute your favorite macros instantly with a single key press.

Command categories

The macro environment provides powerful objects to give users complete control over their documents and editor configurations:

  • Document: Automate tasks on the active document, such as filtering or line retrieval.
  • Editor: Access global editor configurations and batch operations.
  • Selection: Manipulate and query the current text selection.
  • Window: Use global methods like alerts or status messages.
  • Shell: Interact with the operating system, including environment variables and file operations.

Call almost every editor command

Some uncommon editor commands do not have an associated named method. For those commands, you can use editor.ExecuteCommandByID() and pass the command ID.

Advanced customization

EmEditor’s macro system supports custom events and includes directives like #include for integrating external JavaScript files. With third-party libraries, you can extend the capabilities of your macros to handle sophisticated operations like date manipulations using popular libraries such as Luxon.

Built-in and user macros

EmEditor comes with built-in macros, like the AI Macro. Users can create and manage their macros easily, running them across multiple documents or setting them to repeat automatically.

Whether you’re automating data transformations, integrating web services, or streamlining repetitive tasks, EmEditor’s macros offer a comprehensive suite of tools to boost your productivity. Explore the endless possibilities today!

← Word Count Plug-in More Features →

  • Text Editing
    • Batch Replace
    • Binary Editing
    • Bracket/Quotation Mark Auto-Complete
    • Clipboard History
    • Compare Documents
    • EditorConfig Support
    • Filter Bar
    • Find and Replace
    • Format Selection
    • Fuzzy Matching
    • Language Server Protocol Support
    • Multiple Selection Editing
      • How to use Vertical Editing
    • Number Range Expression for Find and Replace
    • Regular Expressions
    • Syntax Checker for HTML, CSS, JSON, XML
    • Syntax Highlighting
  • Powerful CSV Tools
    • Autofill
    • Combine Lines
    • Combine/Split Columns
    • CSV Converter
    • Custom CSV formats
    • Delete Duplicate Lines
    • Extract Columns
    • Extract Frequent Strings
    • Flash Fill
    • Freeze header
    • Insert lines/columns
    • Join CSV
    • Manage Columns
    • Numbering
    • Pivot table
    • Sort
    • Transpose
  • Large File Support
    • Fast Processing of Large Files
    • Large File Controller
    • Large Files up to 16 TB
    • Lightweight, multithreaded design
    • Split and Combine Files
  • User Experience
    • Configurations
    • Customizable Interface
    • Customizable toolbars
    • Document Groups
    • International language and locale support
    • Markers
    • Quick Launch
    • Split window
    • Start Window
    • Tabbed Design
    • Workspace Memory
  • Extensibility
    • AI Assisted Writing
    • AI Toolbar
    • Chat with AI
    • External Tools
    • Plug-ins
      • CommitList Plug-in
      • Explorer Plug-in
      • HTML Bar Plug-in
      • Open Documents Plug-in
      • Projects Plug-in
      • Search Plug-in
      • Snippets Plug-in
        • How to Use Zen Coding
      • Web Preview Plug-in
      • Word Complete Plug-in
      • Word Count Plug-in
    • Scriptable Macros
  • More Features
    • Base64
    • Bookmarks
    • Character Check
    • Character Code Value
    • Customer support
    • Drag and Drop
    • Error Handler and Crash Recovery
    • Fast 64-bit Build
    • Full Screen View
    • Grab Text
    • Half-width/Full-width conversion
    • HTML Character References
    • Jump
    • Markdown Editor
    • Marks
    • Matching Tag Highlight
    • Messaging (plug-in)
    • MIME Encoded-Word
    • Multiple File Encoding Conversions
    • Narrowing
    • Offline Registration
    • Outline
    • Percent-encoding
    • Pin to List
    • Portability Options
    • Privacy-first
    • Quick Start
    • Save to Protected Folder
    • Spellcheck
    • Status Window
    • Tooltip to show HTML/XML character references
    • Unicode Normalization
    • Unicode Support
    • Universal Character Name
    • Uppercase/Lowercase conversion
    • Wildcard Support
    • Windows 11/10 Compatibility
    • CSV
  • History
    • New in Version 26.2
    • New in Version 26.1
    • New in Version 26.0
    • New in Version 25.4
    • New in Version 25.3
    • New in Version 25.2
    • New in Version 25.1
    • New in Version 25.0
    • New in Version 24.5
    • New in Version 24.4
    • New in Version 24.3
    • New in Version 24.2
    • New in Version 24.1
    • New in Version 24.0
    • New in Version 23.1
    • New in Version 23.0
    • New in Version 22.5
    • New in Version 22.4
    • New in Version 22.3
    • New in Version 22.2
    • New in Version 22.1
    • New in Version 22.0
    • New in Version 21.9
    • New in Version 21.8
    • New in Version 21.7
    • New in Version 21.6
    • New in Version 21.5
    • New in Version 21.4
    • New in Version 21.3
    • New in Version 21.2
    • New in Version 21.1
    • New in Version 21.0
    • New in Version 20.9
    • New in Version 20.8
    • New in Version 20.7
    • New in Version 20.6
    • New in Version 20.5
    • New in Version 20.4
    • New in Version 20.3
    • New in Version 20.2
    • New in Version 20.1
    • New in Version 20.0
    • New in Version 19.9
    • New in Version 19.8
    • New in Version 19.7
    • New in Version 19.6
    • New in Version 19.5
    • New in Version 19.4
    • New in Version 19.3
    • New in Version 19.2
    • New in Version 19.1
    • New in Version 19.0
    • New in Version 18.9
    • New in Version 18.8
    • New in Version 18.7
    • New in Version 18.6
    • New in Version 18.5
    • New in Version 18.4
    • New in Version 18.3
    • New in Version 18.2
    • New in Version 18.1
    • New in Version 18.0
    • New in Version 17.9
    • New in Version 17.8
    • New in Version 17.7
    • New in Version 17.6
    • New in Version 17.5
    • New in Version 17.4
    • New in Version 17.3
    • New in Version 17.2
    • New in Version 17.1
    • New in Version 17.0
    • New in Version 16.9
    • New in Version 16.8
    • New in Version 16.7
    • New in Version 16.6
    • New in Version 16.5
    • New in Version 16.4
    • New in Version 16.3
    • New in Version 16.2
    • New in Version 16.1
    • New in Version 16.0
    • New in Version 15.9
    • New in Version 15.8
    • New in Version 15.7
    • New in Version 15.6
    • New in Version 15.5
    • New in Version 15.4
    • New in Version 15.3
    • New in Version 15.2
    • New in Version 15.1
    • New in Version 15.0
    • New in Version 14.9
    • New in Version 14.8
    • New in Version 14.7
    • New in Version 14.6
    • New in Version 14
    • New in Version 13
    • New in Version 12
    • New in Version 11
    • New in Version 10
    • New in Version 9
    • New in Version 8
    • New in Version 7
    • New in Version 6
    • New in Version 5
    • New in Version 4
    • Basic Features
  • EmEditor Free
  • Compare Desktop Installer (MSI), Desktop Portable, and Old Store App (UWP) Versions

Download and try the “world's fastest text editor” now. (Source: ZDNet)

Download Download Free Download

Copyright © 1995-2026 by Emurasoft, Inc.
Download | Buy | Features | Blog | Support | About | Privacy Policy
日本語 | Deutsch | 한국어 |简体中文 | 繁體中文

Scroll to top Scroll to top Scroll to top