Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Macro Enabled Excel Template - MS Dynamics 2016 On-Prem

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans