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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Desktop flow working b...
Power Automate
Unanswered

Desktop flow working by itself but when used in cloud flow returns macro error

(0) ShareShare
ReportReport
Posted on by 30

Hello!

 

My desktop flow runs fine on its own, but when I "Run a Flow built with Power Automate Desktop" I get this macro error:

Problem while executing action 'RunMacro'. Failed to run macro (make sure the macro containing file isn't included in the disabled items list).  Can anyone help?

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    My guess is that the Excel on the computer it is attempting to run on does not have macros enabled from all sources.  I would build into the bot to go to File -> Options -> Trust Center -> Trust Center Settings -> "Enable VBA macros" or Send Keys {Alt}(n), and click OK.

     

    At the end of the bot, I would run the same process and set the Excel Macro settings back to "Disable VBA macros with notification" or Send Keys {Alt}(a) on that same settings window.

  • LW2016 Profile Picture
    30 on at

    I have VBA macros enabled in the Trust Center, but thanks for the suggestions about disabling them after.  The macro runs in PA Desktop, just not from the cloud flow calling the Desktop flow.

  • LW2016 Profile Picture
    30 on at

    I have VBA macros enabled in the Trust Center, but thanks for the suggestions about disabling them after.  The macro runs in PA Desktop, just not from the cloud flow calling the Desktop flow.

  • LW2016 Profile Picture
    30 on at

    Hello again.  The desktop flow was working on its own but I never got it working being called from the cloud flow.  And now the desktop flow isn't working.  When I try to run it, I get the same error as above.  But I can run the macro from the developer tab and the Visual Basic window.  Any other thoughts?

  • VJR Profile Picture
    7,635 on at

    Hi @LW2016 

     

    Can you take a look at this link and see if the solutions work for you.

    https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Error-running-an-excel-macro/td-p/860311

     

  • LW2016 Profile Picture
    30 on at

    Yes, I have used that link previously.  I actually figured it out.  I had to disable COM add-ins in Excel.  I am not sure why because they were enabled when it was working previously, but it worked this time.  I can run the desktop flow from the cloud flow now, the only part I can't figure out is why the email I send with refreshed Excel file (that the desktop flow produces) does not contains the refreshed file.  I think it may be because OneDrive has not synched before the email gets sent.

  • VJR Profile Picture
    7,635 on at

    Yes, looks like a sync issue to be handled using Wait stages.

  • LW2016 Profile Picture
    30 on at

    I have determined this is the issue, but have tried several different waits and delays without success.  This is from another post but did not work.  Do you have any advice?

    LW2016_0-1647520294746.png

     

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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard