1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Copy data from Excel to Word Document

Discussion in 'Business Applications' started by vinotech, Jun 2, 2012.

Thread Status:
Not open for further replies.
Advertisement
  1. vinotech

    vinotech Thread Starter

    Joined:
    Oct 21, 2011
    Messages:
    32
    Hello Everyone.

    I need a help with the VBA macro.

    I have one excel file & a word file. I need the data in the excel sheet to copy in to the word document.

    This is what i need,

    1. When you open the excel file, it has two columns Units & Comments.
    2. The data in the Unit column need to replace this "XXXXXXXXXXXXX" in the word document,
    3. The data in the Comments column need to replace this "cccccccc" in the word document,
    4. once the unit column & comments column data is copied in to the word document. I need the word document to be saved with the file name of "XXXXXXXXXXXXX".

    As a end result, i would have each file for each row in the excel file.

    Is this possible? Could someone help me with this thing?

    Thank you so much for looking in to this,
     

    Attached Files:

  2. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    5,946
    There is a post started by n3on some time ago where I helped some.

    Maybe you can use the idea.
     
  3. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    5,946
    I'm looking up the macro I wrote for n3on and see if I can implement it.

    Do you want to create all files automatically or do you want to be prompted to do so?
    I also expect you would like a column that says if it was created and also one with the date it was created?
     
  4. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    5,946
    Try this one.
    Make sure the Excel and the Word file are in the same folder
     

    Attached Files:

  5. vinotech

    vinotech Thread Starter

    Joined:
    Oct 21, 2011
    Messages:
    32
    Thanks for your help Hans. I will take a look now and let you know.
     
  6. vinotech

    vinotech Thread Starter

    Joined:
    Oct 21, 2011
    Messages:
    32
    Hans, I took a look at the macro...

    I really need to create the files automatically. I dont need them to prompt to do so... The column that says the date created & file created was a good thought...

    Can you just help me creating the file automatically instead of prompting for each row...

    Thanks a lot for all your efforts with this... Much Helpful..
     
  7. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    5,946
    you should editting macro's

    I mailed the solution to your regular mail
     
  8. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    5,946
    Don't forget to mark it solved
     
  9. vinotech

    vinotech Thread Starter

    Joined:
    Oct 21, 2011
    Messages:
    32
    Hi Hans,
    Thanks a lot for the Great Help... This worked very wel & matches exactly with my requirement.

    Thanks a lot again.
     
  10. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1055506