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. It was to create a new document. Every time you run the VBA code, it will create a new MS Word file.

How to create a template in MS Word

Now, I will explain how to insert a text file into the document as is at a specified location into an existing document. This is very useful if you are modifying an existing document. The main feature of this VBA is, it can insert new content at a specific location. That means you can insert new content in to any part of the existing document, not just append the new content at the end of the file. The first step is to create a bookmark in the 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 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 the current document using VBA in MS Word

It makes use of the dynamic fields to create a new document with different values. The MS word document can be used as a template file. Using this template you can create a new document without much effort. Click on the button and fill the necessary information. And the document will be created at the specified location. Edit the macro and modify the hardcoded values as per your needs. Change the location of the target file. The new file will be created and stored at this location 

This video explains the detailed steps to create and use this template.




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

How to install Apps in Android TV

As Android TVs are becoming famous, it's obvious to know whether it will allow us to install apps on Android TV the way we do it on Andr...