Is it possible to use pdf template instead of word/xml template for mail merge template in CRM 2011

Proposed Is it possible to use pdf template instead of word/xml template for mail merge template in CRM 2011

  • Tuesday, May 17, 2011 8:45 PM
     
     

    Hi All,

    What i am trying to achieve is that create a word template in CRM so that field mapping would b easy and out of box, but when we send out email, it should reach to client in PDF format as an attachment. IS that possible at all or not.

    Is it possible to use pdf template for mail merge template in CRM 2011?

    Pls pls reply if anyone know how to achieve that. even if it can be done thru 3rd party tool.

    Thanks.

     


    Puneet Joshi

All Replies

  • Wednesday, May 18, 2011 5:38 AM
    Moderator
     
     Proposed

    Hello Puneet,

    I'm afraid that it is impossible without additional coding.


    Microsoft CRM Freelancer

    My blog (english)
    Мой блог (русскоязычный)
    • Proposed As Answer by Daniel CaiMVP Wednesday, May 18, 2011 3:45 PM
    •  
  • Wednesday, May 18, 2011 2:01 PM
     
     

    Ok.. i am not afraid of coding ... but when and where i would code so that it will convert the word doc attachment to PDF and then reach to end users inbox.

    Guidance pls.


    Puneet Joshi
  • Wednesday, May 18, 2011 3:45 PM
     
     

    It's possible to generate PDF file by pulling information from CRM. But it's not trivial if you want to do the merge on PDF template. What can be easily achieved is to write PDF stream or file using a third party PDF library such as iTextSharp, which is not template approach, and it will require quite decent amount of PDF layout coding.

    Another approach is to use Word mailmerge function to perform the merge and then convert to PDF, which gives you the possibility of letting your CRM users author the template. You may need to look for a third party solution or library as well in order to achieve this.


    Daniel Cai | http://danielcai.blogspot.com

    • Edited by Daniel CaiMVP Wednesday, May 18, 2011 4:18 PM fix some wording problem
    •  
  • Wednesday, May 18, 2011 7:22 PM
     
     

    You can also use the iTextSharp library to populate fields within a pre-created PDF Template - again non-trivial and to make it generic, you need to build a system that maps CRM entity/attributes to PDF form fields.

    We built such a system for CRM 4.0, but it uses some non-supported form javascript customisations that (although I haven't tested it) I know will not survive the conversion to CRM 2011.


    --pogo (pat) @ pogo69.wordpress.com
  • Thursday, May 26, 2011 1:41 AM
     
     

    I agree with you .. Can you just clarify this statement "Another approach is to use Word mailmerge function to perform the merge and then convert to PDF, which gives you the possibility of letting your CRM users author the template" .

    What i am trying to find out that i upload the .xml file and do the mapping and all from out of box crm .. but when it reaches to end user inbox the .doc xml template should reach as pdf in the inbox. Where i can convert this, where i can write this piece of code.Where i would write a plug-in code or something esle (on which method) btw Word mailmerge function to perform the merge and then convert to PDF.

    If you can just explain a lil bit more or steps to achieve this, it will be a great help. I am looking for this solution from a long time.

    Thanks for my life saver.

    Please,Please help me out.

     

     


    Puneet Joshi
  • Thursday, May 26, 2011 8:32 AM
     
     

    You can have a plugin against the email templates entity, when an email template is created (using mail merge with word for mapping.. etc) convert it to a PDF in the plugin code and store that PDF somewhere (in a database or in SharePoint if you get it integrated with CRM).

    When sending the email retrieve the PDF that corresponds to the email template that being sent and attach it with the email.

     


    Islam Eldemery
    http://idemery.net
    idemery
  • Monday, May 30, 2011 10:57 PM
     
     

    Hi Puneet,

    There are two commercial components in the market that may help you achieve your goal, but it's not a trivial task as I perviously mentioned.

    1. http://www.aspose.com/categories/.net-components/aspose.words-for-.net/default.aspx
    2. http://www.syncfusion.com/products/reporting-edition/docio

    They both offer mailmerge capability and also DOC, DOCX -> PDF conversion.

    Hope this helps.


    Daniel Cai | http://danielcai.blogspot.com
  • Tuesday, May 31, 2011 3:39 AM
     
     

    Thanks for the reply Daniel .. But is it possible to mail-merge with fields from other entities too in the same templates.

    Out box CRM provides only one entity, those fields can be used as a placeholder, but the what i want to achieve is, if i associate Accounts entity with a template i would be able to add some fields into that Template from other custom entity.

    For e.g. i have 10 templates now, but may be in future client may add more templates, so system has to be flexible enough to do the placeholder replacements from multiple entities not using the code (if getting fields from multiple entities and generate template possible at all.)

    can you please suggest me if it is possible at all. If yes, can you guide me please.


    Puneet Joshi
  • Tuesday, May 31, 2011 3:54 AM
     
     
    What you have mentioned is possible using either one of the libraries. But as I said, it's not a trivial job. You can get started by reading through the mailmerge samples provided by the libraries. 
    Daniel Cai | http://danielcai.blogspot.com