Create PDF document from files in SharePoint and send as an email attachment

Follow Debajit’s Power Apps & Dynamics 365 Blog on WordPress.com

I am very excited to announce the new Utility from XrmForYou stable – “SharePoint Document Merger”. Let’ directly jump to the Utility functionality and other details

So what does this Utility address?

You have an opportunity in CRM and you are using the OOB CRM-SharePoint integration to store documents in SharePoint corresponding to the opportunity. And now you need to combine all these documents into a single PDF and send it to your customer or team or anybody, over an email as an attachment

Well if this has bothered you and you are thinking on how to do this, you no longer need to worry. The Utility just does this and it has some other features as well which I am going to explain below. And all these with few configuration steps.

For trial and pricing, please write to us at info@xrmforyou.com

How does this work?

The tool comes in the form of managed solution. Once you get hold of the solution, you need to install the managed solution.

Once the solution is installed, open up the solution and navigate to its configuration page. The first section is to enter the license key which would be provided to you by XrmForYou.

image

You can do your entire Merge configuration by expand the section “Merge Configuration settings”

image

As you can see from the screenshot above you need to enter some details for the tool to work. The tool does not use a username and password. Instead it leverage OAuth2.0 to authenticate with SharePoint. All you need to do is register this tool as an APP in your Azure Active directory as Web  App/ Web Api.

Once the APP is registered you would need to enter the client_id and client_secret information of the APP here. The client_secret is stored inside CRM and is protected by encryption

Azure Application Url is the URL of the Sharepoint.

MergedFileName is the name of the Output file.

Once you save your merge configuration settings, that’s all you need to do.

Now let’s see it in action.

I have an account below where I have uploaded 4 files.

  • One excel
  • One word
  • One PPT
  • One pdf
image

Since Merge Configuration has been enabled, a new ribbon item would start appearing in all the entities which has been enabled for Document Management. So in Account entity form I could see the Merge Button.  This would be show automatically and no configuration is required from the customer side.

image

Once you click on Merge document you would get the below message:

image

Within a moment you should see the the merged document containing all the contents of the merged file.

image

Wonderful isn’t it? The PPT, excel, word and the PDF file have merged into a single file. The file will bear the same name as you provided in the configuration. And yes before you ask, it works on the Unified interface as well.

And finally the output file. First page – the word document

image

Second Page – the excel

image

Third Page – the powerpoint

image

Wait the show is not over. We are releasing the utility with two versions. One with the option to generate just the merged file and the other with the option to send the merged file as an attachment over email. So once the merge completes, you can hook in and put in your code to send an email automatically or do anything you like with the generated document.

The content of the document, the record context everything would be available and you can play with it!

What’s not there in this release?

We don’t want our customers to have sudden surprises once they are into using it and duly I present some of the stuffs which we are already working on for the next release but is not there in the current version!

  • Documents are merged in descending order of modified on date.
  • Currently only the specified formats are supported – csv, doc, docx, odp, ods, odt, pot, potm, potx, pps, ppsx, ppsxm, ppt, pptm, pptx, rtf, xls, xlsx.. Going to change very soon with the next release. Stayed tuned for the next update in couple of months time.
  • Support for OOB sharepoint document location only. Next release in the coming 2-3 months support multiple document location merge for each record.
  • Available only for online customers.
  • Output file is only pdf format.

So what’s keeping you waiting. Just drop us a note at info@xrmforyou.com to grab your free trial.

Documentation and video to appear in our website www.xrmforyou.com by next week. Stay tuned!

Debajit Dutta

(Dynamics MVP)

For consultation/ corporate training visit www.xrmforyou.com or reach out to us at info@xrmforyou.com

Our product offerings:

Role based views for Dynamics 365 (http://www.xrmforyou.com/role-based-views.html)

CRM-Sharepoint Attachment uploader and metadata manager (http://www.xrmforyou.com/sharepoint-integrator.html)

Record Cloner for Dynamics 365 (http://www.xrmforyou.com/record-cloner.html)

Multiselect picklist for Dynamics 365 (http://www.xrmforyou.com/multi-select-picklist.html)


Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe to get the latest posts sent to your email.

Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading