DEV Community

Cover image for Word Document to InDesign Automation
Mallikarjun H T
Mallikarjun H T

Posted on • Updated on

Word Document to InDesign Automation

word document

problem statment: need to convert word document into design document with the styling defined by the customer.

given a style requirments like Font Name, Font weight, document size, we need to read the word document and create design document.

well we have to retain the formating like Italic, Bold, Different font styles like Heading1, etc... now since we know the requrment, how about we use Microsoft word DLL'S.

Thats what I will be trying to do.

This article shows how to create a Word document using C# and Office 2013.

Want to know more on how i will be implimenting, Then visit my Github profile

InDesign

we have equley same chalange in InDesign as well.

Are you a designer and wonder how you can Automate your Dailey Tasks?
Have you ever wonder how to convert word document(.docx) to an InDesign document with a click or programitcally?
Do you know that InDesign Application can be automated/ Scripted?

well Adobe gives you 3 ways of doing it within the appliction.

  1. Apple sctipt
  2. JavaScript
  3. VBScript

But wait what if i tell you can do it with csharp? 🤔
yes you are right. Adobe is buit on C++, and once you have installed the application you can Automate it using CSharp.

A Designer who has to convert all the word documents to a magzine has to manually copy paste and mke sure the fonts are applied as used in document and should retain the styles applied.

well think of what is the amount of time invested in doing so. wonder if you can make a differance by automating, well it will reduce the time and effert. well as metioned one can write a script and run it to accomplish a task, but i am here to share yet another way how you can automate.

CSharp can be used to automate this task will share one small tip, if you wonder how we can do. imagin if we want to save a document with desired formet well we can yse save method thats available to do so.

save (to:File, [stationery:Boolean=Boolean], versionComments:String, [forceSave:Boolean=Boolean])

you might be familear with how to place text frame and place some text inside it, well we have a method colled place.

place (fileName:File, placePoint:Array of Number String, destinationLayer:Layer, [showingOptions:Boolean=Boolean], [autoflowing:Boolean=Boolean], withProperties:Object)

i have wrote a program that take document and creates a InDesig document. Its not much but will sure add some more when i start developing.

here are some resources you can refer for more on functions available
1) InDesign ExtendScript API (8.0)
2) code project

More on up-comming posts ❤️

Top comments (0)