russlp Posted March 3, 2021 Posted March 3, 2021 Hi All, I've had this query today and didn't really have an answer as I tend to install word and run... but I wondered if anyone has any thoughts and suggestions at all? I formulate admissions policies for schools across the region each year. While they are based on a template drawn up by me and the Diocese, each one is a separate Word document. A large part is identical (the process, definitions etc) and there is school-specific information which is different for each: contact details, oversubscription criteria, maps, logos etc. I do this work in Word and then produce a pdf of each document. If there is an amendment to make because of a typo or a change in wording then I have to go to each document and make the change there. This includes removing "proposed version" from each document, changing the date on them etc etc. With 400 documents, this is pretty time-consuming. Ideally I'd use a MailMerge function to populate various fields such as the contact details etc. That would be fine with simple text, including largish paragraphs of text. That can be stored in a linked spreadsheet or database fairly easily. The problem is where the text has formatting which is lost in a spreadsheet cell - such as footnotes - or storing jpgs. They just don't work with Word's MailMerge function as far as I can see it. Nor is there a CTRL-H find and replace function that works across multiple files at the same time. Is there anything you're aware of that could get round this? Either a way of storing formatted text and pictures that can be merged into multiple documents or a way of replacing text across multiple files? I would use other software if that had the right functionality and Office didn't. Any help would be very much appreciated. Thanks in advance.
mavhc Posted March 3, 2021 Posted March 3, 2021 pictures: https://www.datanumen.com/blogs/2-ways-batch-insert-multiple-pictures-word-document-via-mail-merge/ formatting: do they want different formatting in different documents? Usually you'd just apply the formatting you wanted to the Field in Word 2
dhicks Posted March 3, 2021 Posted March 3, 2021 I wondered if anyone has any thoughts and suggestions at all? DOCX files are actually Zip files containing XML and other data, with a little bit of scripting it is possible to search-and-replace various values and duplicate pages. We have a print-ready calendar produced nightly from iCal data produced from our Google Calendar, that uses a DOCX template. The source code, if it's any help, is here: https://github.com/dhicks6345789/docx-merge The above isn't properly finished - I got as much functionality done as was needed to produce calendars, other features are currently lacking. It's handy for seeing how to open and change text inside a DOCX file, though - just unzip it, modify document.xml and re-zip the file. For converting from DOCX to PDF, I use rclone to upload the DOCX file to Google Drive then download in PDF format. This works well as long as you make sure you format your DOCX file for Google Docs, which basically seems to mean no images or text boxes floated over the main page, just stick to inline images only. 1
mavhc Posted March 3, 2021 Posted March 3, 2021 To convert docx to pdf just use Word, and you can automate word https://github.com/AlJohri/docx2pdf (I added pdf2docx code to that, although not uploaded it yet) 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now