1

If I wanted to create Invoices (or whatever other types of documents), in microsoft Office, how would I go about doing that?

Let's say I have my database full of data, and I have to generate 10 million documents from a given MS Word template, with data from my database. I know the Powershell should be able to generate at least some basic MS Excel sheets, but does it work for MS Word, and isn't there anything better than Powershell?

(the version doesn't matter, but I expect it to be available for the newer versions)

For PDF documents there's the Lifecycle designer, but I don't know about anything for the Microsoft side.

1
  • For 10 million documents, it's advisable to subject all suggestions to a volume test. People working in low-volume environments do not necessarily have experience of high-volume environments and may make suggestions that simply will not stand up. Sure, MailMerge is supposed to be able to take the data and generate output. But actually, if you are merging (say) form letters to a printer, the entire merge will be output as a single print job. Not good, if something goes wrong. Perhaps better to use something designed for that job. – user181946 May 3 '13 at 19:17
3

You can achieve this by using Word's built in Mail Merge functionality.

Several sources of info:

Use mail merge to create and print letters and other documents

How to use mail merge to create form letters in Word

Word mail merge: A walk through the process

2

Word (and all of the Office suite) have a rich API that allow you to pretty much programmatically create any document.

Here are just a couple of the MSDN articles that could get you started:

It all depends on how extensively you want to program.

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.