+ Reply to Thread
Results 1 to 4 of 4

VBA code to copy and create n number of word documents from excel range

  1. #1
    Forum Contributor
    Join Date
    09-04-2007
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    133

    VBA code to copy and create n number of word documents from excel range

    Hi all,

    I am pretty new in VBA coding for word documents. I am trying to come up with a VBA code to copy and create n number of word documents from excel range (for example, say excel spreadsheet has 100 items in range A, i would like to loop through the range in column A and copy and create 100 word documents).

    After creating say 1st document, i would like to loop through a particular row and fill the text form fields in newly created word document with the values in row 2. Say i have 20 columns with data for each item.

    Any help will be greatly appreciated.

    Thanks and regards,

    Kon.
    Last edited by skonduru; 01-17-2013 at 05:18 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: VBA code to copy and create n number of word documents from excel range

    Hi
    Post the excel file which has to be copied into word.
    Click *, if my suggestion helps you. Have a good day!!

  3. #3
    Forum Contributor
    Join Date
    09-04-2007
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    133

    Re: VBA code to copy and create n number of word documents from excel range

    Hi jraj1106,

    Thanks for the reply. Attached are the word and spreadsheet templates. I have a word document filled out of 1st structure. I would like to create the 12 copies of this word documents and fill out the text form fields with the data from spreadsheet (order of the fields in word are from top to bottom and in some sequential order).

    Thanks alot.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    09-04-2007
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    133

    Re: VBA code to copy and create n number of word documents from excel range

    Hi All,

    I was able to figure out the code and below is the final outcome for your reference:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1