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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Macro Enabled Excel Template - MS Dynamics 2016 On-Prem

(0) ShareShare
ReportReport
Posted on by

Hi All, 

I'm getting mixed answers from my team internally, so I thought I'd ask you folks. Is it possible to create a macro enabled excel template in Dynamics 2016 On-Prem?

Thanks!

*This post is locked for comments

I have the same question (0)
  • MSCRM Guru Profile Picture
    600 on at

    Hi David,

    Bottom line is it depends on your org's security policy.  The Excel template can be imported into CRM with a macro, but it will be treated as an unsafe internet downloaded document by default.  I couldn't get Excel\Windows\IE\Chrome to just trust the Excel file, but maybe it's possible with some advanced group policy...

    If the user marks the file as safe and approves the Macro in Excel it can be executed.

    Good luck!

  • RyanCPerry Profile Picture
    105 on at

    I second this question, but with regard to D365 online (8.2 Specifically).  When attempting to upload a macro-enabled workbook, I get a "file type not supported" error. Is there a security setting or workaround for this? 

  • Tim Dutcher Profile Picture
    2,100 on at

    I have a client that needed to be able to run macros in an Excel file downloaded from D365 (v8 online). The solution I came up with was to rename the .xlsm (macro-enabled) Excel file with the extension .xlsx. I then created the Excel template in D365 and uploaded the file. That was a one-time process. 

    Now that the template is in place, end-users download the template on-demand and then rename the .xlsx to .xlsm to be able to run the macros. 

    It's not ideal that users need to rename the file to run the macros, but the project lead didn't want me to fully automate the production of the final Excel file, so this was an acceptable compromise in terms of using out-of-box functionality and a little bit of manual intervention and training.

  • sushicat_san Profile Picture
    on at

    Interesting...I'll give it a try on the CRM 2016 on prem version and see if we it'll work. Thanks Tim!

  • Rasmus Staun Sorensen Profile Picture
    on at

    Hi Tim, 

    I tried your trick of uploading an Excel Template of the file type xlsx in an effort to accommodate CRM's file requirements. However, changing the file format deletes the macros, so the user downloading the template would not have a file with the macros. How did you overcome that obstacle?

    Thanks in advance. 

  • Karol_M Profile Picture
    41 on at

    Do it this way:

    1. create a template in Dynamics

    2. Open it in Excel and add the macro

    3. Save as xlsm

    4. Change the name to xlsx

    5. Upload as a template in Dynamics

    6. Download the data file to disk

    7. Change the name to xlsm

    8. Open in Excel and run the macro

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans