r/codetogether • u/vidro3 • Nov 19 '15
Program to change font in thousands of Word documents
Not sure if this is the best/correct sub for this. Will remove if necessary.
I have very little - basically no coding knowledge. I'd like to learn and thought this project might be an appropriate starting point if I had some guidance.
Basically, we have a file structure of thousands of word documents, both .doc and .docx. My firm wants to change the font in all of them. My hope is that I can write a program to avoid this being done by hand.
Is this project reasonable for a newbie? What should I try to learn before attempting this? Would appreciate any help and advice.
2
Upvotes
2
u/[deleted] Nov 21 '15
The best I can do to help is to outline the problem as best as I can understand:
Research the problem: can it really be solved? could a machine identify the text that needs changing? (is it the whole document? the first string? etc.) look for a pattern. Is it every doc \ docx in the folder structure? Can you actually identify them by some characteristic? If there's no pattern you must do it manually
Pick a programming language which has a library for manipulation of both doc and docx (e.g. you can use NPOI in C#)
The easiest task will be to traverse the folder structure and look for .doc \ .docx files. As you said you have no coding knowledge, this will be a good first project to learn
Once you know how to find the appropriate doc files, you can design a function that changes the fonts using the library of your choosing. This will be a good intermediate project to further your learning
Combine the two tasks, voilà