Results 1 to 5 of 5
  1. #1
    jo15765's Avatar
    jo15765 is offline Expert
    Windows 10 Access 2016
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    672

    Copy Data From One Word Document To Another

    We have about 3,000 word documents that are tailored to specific Customers, and well...we need to update some of the verbiage. The data that makes it customized to that specific customer is in either a text box or table.

    Using access vba how can I
    1) Open customer1.docx
    2) Open template.docx
    3) Iterate all text boxes and tables on customer1.docx and paste into the same table/textbox on template.docx
    4) Close customer1.docx


    5) Move customer1.docx to archive folder
    6) Save template.docx as customer1.docx

  2. #2
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    If I understand correctly, you are wanting to automate Word using Access?
    You are wanting to use Access because the names of the documents/Customers and the updated verbiage are in 1 or more Access tables?


    So you have "about 3,000 word documents". Does that mean you have "about 3,000 specific (unique) Customers"?

    Or each "specific Customer" has 1 or more word documents? Customer1 might have 1 document, whereas Customer2 might have 5 documents?

    If a "specific Customer" has more than 1 document, are all documents modified the with the same verbiage?


    I would probably start by recording code (Word calls it a "Macro" like Excel), then figure out the changes necessary to convert the Word code to Access code.

    I did a quick search and found a YouTube video about "Word Macros" and a site of Word Macro Examples & VBA Tutorial.

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,924
    Why not just copy and rename?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    moke123's Avatar
    moke123 is online now Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,653
    Is this a one-off excersize or something to be done repeatedly?

    Have you looked into word merge?
    Albert Kallal has a great application, Super Easy Word Merge- http://www.kallal.ca/msaccess/msaccess.html
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  5. #5
    jo15765's Avatar
    jo15765 is offline Expert
    Windows 10 Access 2016
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    672
    This is a one off excercise.

    The data does not exist in access tables. The data literally only exists in the word document. I was wanting to use Access to do it as I could create a button to visually update/display progress to the user (as this process will be performed by 5 - 6 different people with the same amount of word documents to update.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Rename word document during copy/paste
    By Homegrownandy in forum Programming
    Replies: 3
    Last Post: 07-17-2018, 08:15 AM
  2. Replies: 3
    Last Post: 06-27-2017, 12:06 PM
  3. Replies: 4
    Last Post: 08-24-2015, 12:57 PM
  4. transferring data from a Word document
    By bdaniel in forum Programming
    Replies: 5
    Last Post: 01-03-2012, 11:16 PM
  5. Replies: 5
    Last Post: 07-16-2010, 10:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums