Sunday, April 17, 2016

How to create MS Word document automatically by inserting text file content to the word document

There are many situations you may want automate the MS Word document creation. In my previous posts I have explained how to automate document generation using VBA.

How to create a template in MS Word

Now, I will explain how to insert a text file into document as is at a specified location in the document. First step is to create bookmark in word document where the text file content will be pasted. Then, open the text file using VBA code and paste the content at the bookmark. Save the file as with different name. Before saving optionally you can remove the bookmark.

Below video shows shows details steps to insert a text file into MS word document


How to make a copy of current document MS Word automation with dynamic fields

How to make a copy of current document using vba in ms word.

It makes use of dynamic fields to create a new document with different values



Part 1:  how to use dynamic fields in ms word
https://www.youtube.com/watch?v=MlzyKniRckQ





you can download the ms word file here

https://drive.google.com/open?id=0B4UB3eOhhY26ZWhySlpROWlidEU