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

  • Karol_M Profile Picture
    Karol_M 34 on at
    RE: Macro Enabled Excel Template - MS Dynamics 2016 On-Prem

    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

  • RE: Macro Enabled Excel Template - MS Dynamics 2016 On-Prem

    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. 

  • sushicat_san Profile Picture
    sushicat_san on at
    RE: Macro Enabled Excel Template - MS Dynamics 2016 On-Prem

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

  • Tim Dutcher Profile Picture
    Tim Dutcher 2,100 on at
    RE: Macro Enabled Excel Template - MS Dynamics 2016 On-Prem

    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.

  • RyanCPerry Profile Picture
    RyanCPerry 105 on at
    RE: Macro Enabled Excel Template - MS Dynamics 2016 On-Prem

    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? 

  • MSCRM Guru Profile Picture
    MSCRM Guru 600 on at
    RE: Macro Enabled Excel Template - MS Dynamics 2016 On-Prem

    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!

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,468 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,287 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans