web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - General Discussion
Unanswered

Replacing Macro's tasks in Excel and Word documents

(1) ShareShare
ReportReport
Posted on by 1,142
Hi,

Just a general question to see if anyone else as had to do this and what is required.

My organisation as decided to stop the use of Macro's and is looking for a replacement.

It seems Power Automate, can potentially perform the task of a Macro or Macro's.

Any help or guidance would be appreciated
Categories:
I have the same question (0)
  • Power Platform 1919 Profile Picture
    1,519 on at
    Replacing Macro's tasks in Excel and Word documents
    Short answer
    Power Automate cannot fully replace Excel Macros. It can handle some automation, but many advanced Excel capabilities still require VBA. Best option is a hybrid approach based on what kind of automation you need.
    Where each tool makes the most sense
     
    Power Automate Desktop
     
    1.Good for automating desktop actions like clicking UI buttons, opening files, launching apps and interacting with other desktop software
    2.Useful when workflows involve multiple apps on Windows machines
    3.Replaces basic macro tasks that imitate user actions at the desktop level
     
    Office Scripts + Power Automate (cloud flows)
     
    1.Works well with Excel files stored in SharePoint or OneDrive
    2.Ideal for scheduled automation, integration with Outlook, Teams and SharePoint
    3.Great for repetitive Excel transformations and cloud collaboration
     
    VBA Macros
     
    1.Best for deep Excel functionality: custom forms, workbook events, advanced formatting, calculations and complex logic
    2.Works offline and doesn’t depend on cloud storage
    3.Still the most powerful for pure Excel automation 
    4.Power Automate Desktop needs Windows and is fragile if UI changes
     
    Limitations to note:
     
    1.Office Scripts cannot handle Excel events like Workbook_Open or complex UI interactions
     
    2.Macros do not run in Excel Online
     
    Finally,
     
    Power Automate can replace some macro-based processes (especially workflow automation and cloud integration) but cannot match the full power of VBA. A mixed approach gives the best results: use Power Automate where it fits and keep macros for advanced Excel-driven scenarios.
  • Chris1968 Profile Picture
    1,142 on at
    Replacing Macro's tasks in Excel and Word documents
    Hi,

    Thank you for your reply.

    It looks like our organisation is intent on removing all Macro's as they say it's a security risk??

    I'll do some more investigation as to what the Macro's being used actually do as the remit is create something which will replace Macro's 🤔
  • wolenberg_ Profile Picture
    985 Moderator on at
    Replacing Macro's tasks in Excel and Word documents
    Hi @Chris1968

    A lot of teams are moving away from VBA macros, and Power Automate is usually the go‑to replacement. For Excel, you can pair Office Scripts with flows to handle the same kind of logic macros used to do. For Word, it’s more about automating document creation, approvals, or notifications rather than in‑document scripting.

    In short: if your macros are about workflow, Power Automate can replace them directly; if they’re heavy on Excel logic, use Office Scripts + Power Automate together.


    If this helped or could help others in the community, feel free to give it a like or a kudo — it helps surface useful answers for everyone!

  • rzaneti Profile Picture
    4,199 Super User 2025 Season 2 on at
    Replacing Macro's tasks in Excel and Word documents
     
    Just to add to the responses above: for combining Office Scripts with Power Automate, your script must run in no more than 120 seconds, which can be tricky for complex logics. The workaround here is to improve your script as much as you can (avoid loops and unnecessary steps) or break the logic in different subscripts.
     
    I've posted a few blogs about how to perform some operations in Office Scripts, and maybe this introductory one can be helpful for you to get started: https://digitalmill.net/2023/06/19/get-started-with-office-scripts/
     
    Let me know if it works for you or if you need any additional help!
     
    If this solved your issue, please mark it as Accepted Answer.
    👍 If it helped, feel free to give it a like!

    🌐 Explore more Power Platform content on my Website or on my ▶️ YouTube
    💼 Find me on LinkedIn

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 499 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 498 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 270 Most Valuable Professional

Last 30 days Overall leaderboard