4

I'm a new user to QGIS and I'm seeking a specific method for an exporting task. Currently, we have a 20 page Word document report with a blank page 5 for a location map to be inserted into. Once the document has been manually checked for errors, we convert it to PDF and combine it with the location map PDF (the map is exported from QGIS composer separately). We do 100s of these reports a day. Each location map is of a different area, and each report is different too.

Now, what I want to do is export the location map directly from QGIS into PAGE 5 of the existing Word document report. It will save us valuable time this way.

What's the best way of accomplishing this? I can't find any solutions online or by myself. Is there a QGIS plugin available? Or a python method someone knows of?

  • Would it not be easier to export the map as a picture file and add it to the Word doc before conversion into pdf? You could even automate the picture insertion a bit with a macro – firefly-orange Aug 29 '17 at 13:19
  • I'll have to read up on macros! thanks for the tip. Again though, I'm trying to make this one seamless process. I want to take a relatively quick process and make it even quicker. No messing around with separate files. – Theo F Aug 30 '17 at 17:46
2

I think you should separate the task in two:

  1. Producing the location maps as one task
  2. Inserting your maps in the reports

Facing the very same problem more than 15 years ago we went for a solution that had the following components for the document production:

  1. A data base with the information of the report with a field with the name of the file with the location map
  2. a location map as an image with a coded filename, the same stored in the database
  3. the insertion in the word document was done with the code {INCLUDEPICTURE} that was maipulated with the mail merge feature

I think what is new today is that we could have done do the location map with the QGIS capabilities.

For the automated location map production you could have a look to this Q&A: Looking for help for automatically making a QGIS map

For inserting the image in the report you could have a look to this post: https://word.tips.net/T001548_Merging_Graphics_into_Word_Documents.html

You need a single data base that is the base for the location map production and the report production.

  • Thanks for your help. The reason I originally asked this question was because my boss said he met with a client who had the exact method I'm seeking. Ie. a map was exported directly from QGIS composer into an existing Word document. However, my boss isn't that tech savvy so could be imagining things... I wonder if it was a python script of some sort. – Theo F Aug 30 '17 at 17:42
  • I think I may switch to ArcMap and use the data driven pages feature to rapidly export all the location maps at once near the end of each day. Although it won't insert the maps into the reports, it'll save me some overall time. – Theo F Aug 31 '17 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.