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 205.9K 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. Anonymous
    2017-02-09T21:36:10+00:00

    Thank you Jay, I'm going to give this a try in the morning.  Thanks again!

    -Jim

    0 comments No comments
  2. Anonymous
    2017-02-11T09:42:19+00:00

    Hi James,

    Do you need further help?

    Regards,

    Neha

    0 comments No comments
  3. Anonymous
    2017-02-20T14:21:05+00:00

    I finally had a chance to work with this, it works perfectly.  Thanks!!

    -Jim

    0 comments No comments
  4. Anonymous
    2017-06-20T05:07:03+00:00

    This is exactly what I'm trying to do, but I could use some more detailed instruction about how to write or record the macro that will automatically update the fields whenever a document is opened.

    0 comments No comments