Is PHPWord suitable for direct mail? (also named Mail Merge in MS Office Word)
Here is the process I want to automat:
.docx documents are provided to the application. They are formatted for direct mail with fixed parts and a collection of merge fields.
For each document, the application will search for the data in several databases, then create the custom documents.
found this
http://phpword.readthedocs.io/en/latest/templates-processing.html
Efficient but does not use native word merge fields.
According to me, it's a lack because we are forced to retouch already existing standard documents.
Related
I would like to send automated emails to a group of users present in my DB. The emails would contain data with dynamic content. Mostly a table with different set of items. I was looking to use mailchimp templates for that, but it doesn't seem to allow for the kind of dynamic content I am looking for. Essentially for each user, my code would come up with a json array of items to populate the table with.
I am at a loss as to where to get started there. Any interesting tools to do this kind of work, that can be called programmatically from python?
I do not see any office.js api exposed to compare the documents. Similar api in native office add-in is https://msdn.microsoft.com/en-us/library/office/ff195665.aspx
Any way to achieve this?
It depends on what you mean by "compare". If you're trying to compare in the sense of "is the SHA1 of these documents identical", then you could use the getFileAsync API on both documents (assuming there's an add-in in both) and/or the Files REST API (if your file is stored in the cloud).
If by "compare" you mean a more fine-grained comparison, you could compare many of the properties by going sheet-by-sheet and comparing the values/formulas/numberFormat/etc. properties on the used range of each sheet.
If you need something in-between (and I'd be curious what it is), please suggest it on UserVoice and post a link here for reference. https://officespdev.uservoice.com/
My work routinely requires us to deliver documentation to our customer and other parts of the business. These documents are in the Microsoft Word format, and use a template stored on our servers. Our colleagues and the customer occasionally comment that the documents take a long time to open, as each one tries to connect to our server to locate the template, and either succeeds or fails and times out.
Is it possible to keep each document in their current format (i.e. with the template applied), but not require it to go looking for the template every time it is opened? Mostly for the customer who cannot access our servers for the template. Ideally, we do not want to deliver the template with the documentation.
No, it's not possible to stop the document looking for the template. This is a bigger problem with some versions of Word than with others. But best would be to use a tool to link the document to Normal.dotm (or Normal.dot if this is pre-2007) before sending it out. The tool could generate a Document Variable to store the path to the original template so that another tool (or the same one) can re-attach the template when/if the document comes back.
Is there any document exchange format for metadata among CMS?
For example, between Sharepoint and Alfresco, or Alfresco and Documentum?
I've been building a CMS and couldn't find a commonly accepted standard for content metadata. I decided to use the approach NestaCMS did by simply placing it at the top of the document: http://nestacms.com/docs/creating-content/metadata-reference
And then filtering it out when published.
We have a number of customers that we have to send monthly invoices too. Right now, I'm managing a codebase that does SQL queries against our customer database and billing database and places that data into emails - and sends it.
I grow weary of maintaining this every time we want to include a new promotion or change our customer service phone numbers. So, I'm looking for a replacement to move more of this into the hands of those requesting the changes.
In my ideal world, I need :
A WYSIWYG (man, does anyone even say that anymore?) email editor that generates templates based upon the output from a Database Query.
The ability to drag and drop various fields from the database query into the email template.
Display of sample email results with the database query.
Web application, preferably not requiring IIS.
Involve as little code as possible for the end-user, but allow basic functionality (i.e. arrays/for loops)
Either comes with it's own email delivery engine, or writes output in a way that I can easily write a Python script to deliver the email.
Support for generic Database Connectors. (I need MSSQL and MySQL)
F/OSS
So ... can anyone suggest a project like this, or some tools that'd be useful for rolling my own?
(My current alternative idea is using something like ERB or Tenjin, having them write the code, but not having live-preview for the editor would suck...)
I think your looking for a reporting tool which is also capable of sending email. Sending a generared report in html or pdf shouldn't be to hard to do as well.
I've used JasperReports in the past for which I think it should fit your needs.
Another good solution is the pentaho reporting tool
You could easily write something on your own.. give them a basic edit control and allow them to use psuedo variables like {customername} {anothercustomerattribute} within the mail body.
On submit either send directly or save as template.
When the template is sent away the script automatically parses stuff like {customername} into the real customers name from the database.
Your own very very simple custom scriptlanguage :)
Everything else like loops and so on would be maintained on serverside. And if you want particular groups of customers to receive the letter, allow the enduser to select from selectboxes or whatever and do the rest on the serverside with pre-defined rules.