Word 365 - Insert text from file automatically

Anonymous
2017-02-09T20:26:30+00:00

I'm sure this has been answered, but I'm not finding the right search terms.  I have a series of Word files, each requiring a list of names.  I'm looking for a way to type the names once, then have them automatically inserted into the rest of the files.  The names will change every week, so I'd like something like a master list file, then the rest of the documents are automatically refreshed with the new names upon opening.  I tried a macro, but it's only working if I manually run it; other users will run it, so I'd prefer to avoid having user tasks to make this happen.  Ideally, the main file is changed, then the others are updated when they are opened.

Is a macro that takes the list from a separate file the best way to do this?  How do I get it to autorefresh...I have seen suggestions on updating the autoexec file, but the instructions are not complete, and I'm not sure if messing with this is the best idea.  I'm very open to suggestions here!

Thanks,

Jim

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Jay Freedman 206K Reputation points Volunteer Moderator
    2017-02-09T21:25:30+00:00

    The correct solution is to put an INCLUDETEXT field in each document where the list needs to appear, with the full path and file name of the document containing the master list.

    You will then need a macro named AutoOpen in each document that contains an INCLUDETEXT field (or in the template they're all based on, if there is a single such template) with this code:

    Sub AutoOpen()

        ActiveDocument.Fields.Update

    End Sub

    That macro will run each time the document is opened, and it will update the INCLUDETEXT field and any other fields in the document. If the master list document has been edited, the new list will appear as the field's result.

    If the macro is in each document, then that document must be saved as a macro-enabled document (*.docm instead of *.docx). If the macro is in a template, then the documents can be .docx, but the template must be *.dotm instead of *.dotx.

    One caveat is that each user must have access permission to the file that contains the master list.

    3 people found this answer helpful.
    0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Doug Robbins - MVP - Office Apps and Services 322.1K Reputation points MVP Volunteer Moderator
    2017-06-20T05:23:01+00:00

    See the article "What do I do with macros sent to me by other newsgroup readers to help me out?” at:

    http://wordmvp.com/FAQs/MacrosVBA/CreateAMacro.htm

    0 comments No comments