Adobe InDesign automation with VBA

After months of research and experiments I finally find out how to do it, it is simply awesome and I am so proud of it.

The problem I wanted to solve was this: how to automate the pagination of a big catalog without spending any effort by hitting recursively CTRL+C and then CTRL-V and being sure that the next time you’d want to update it or rectify something you won’t have to go crazy a start all over again which I can tell you, it is very frustrating. 

My catalog needed to organize about 16k different products, with their own description, picture etc and I wanted to make the index with links and pictures too. At first I realized that Adobe InDesign(here is the link) was the right software for me. I could have used Microsoft Word and have a much easier time making some automation, but unfortunately Word is too heavy for such long documents and too much pictures. Moreover InDesign results and possibilities are infinite. Last but not least ID can make print files that you can give to professional studios whether you want to have professional copies.

Therefore, with the decision of using InDesign, I had to study how to use it and by chance my company paid me and the marketing dept a course for beginners which unfortunately was really for beginners: how to create a new file in InDesign, how to save etc. Not really what I was looking for. With that said, the teacher was good and I took the chance before leaving to ask him how to automate InDesign. Unfortunately I haven’ got any useful answer and I started to think, search on the web and try.. most of the times without any good results!

Now though, while I’m writing, my crazy project is done and I want to share with you what I’ve learned because I know there is nothing about this topic out there.

Starting from the basics, those are the software I’ve used together:

  • Microsoft Access: this is the data base where I take the data structure from (part numbers, descriptio, URL of the pictures and so on);
  • Microsoft Excel: I use it to make the structure of the index while the program is working
  • VBA or Visual Basic for Applications: this is the heart program I created. If you don’t know about it I can tell you that you definitely should (here is the Wikipedia link) as this simple programming language can help you in a ton of different ways, believe me. I use it for everything and makes my life easier. You can use it with Arduino too and is much much more easy to understand and have more functionalities (for example saving the values of some sensors in a Excel spreadsheet). The good news is that there is nothing more explained than VBA on the web: you’ll find literally whatever you might think of.. well except the VBA and InDesign tutorial..!
  • Adobe Indesign: is the last part of the program and you will basically see it do for you all the boring stuff.
  • Issuu: the online platform were I published the catalog (here is the link)

I have to tell you that I was fortunate finding at least a base that made me sure that this kind of automation was possible. This base is a guide that I found on the internet, made by Adobe itself:

Adobe InDesign Scripting Guide

It’s a very simple guide about how to do some script to automate InDesign with different programming languages, including VBA. You’ll find out how to create a text box, place it in a certain position and more other actions. But between this and the automatic catalog there is, at least for me, a lot of experiments and failures.

I will shortly post some other videos to explain how I did my program and how to manage different objects like textbox, pictures, rectangles, links and so on. Meanwhile, have a look at this link to the YouTube video I made to show you how it basically works: click here.

If you have doubts or specific questions feel free to ask!

Stay tuned.

Max

Leave a comment