Share via

Update header with file name when using save as

Anonymous
2021-01-14T14:40:32+00:00

Is there a way to insert a header into a template that will automatically update to the file name when using "save as" in a different folder?  For instance:  I have a template that has a header to insert a client's name.  When someone else uses that template for a client and saves it in their folder as the client's name, is there a way for the header in the document to automatically update to the client name as well?  I'm trying to avoid having them unlock the document to manually change the header.

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

Answer accepted by question author

Charles Kenyon 167.8K Reputation points Volunteer Moderator
2021-01-15T15:19:29+00:00

If you want it to be from the file's name (not folder) you can use a filename field.

Note that it will give the full filename including the docx extension.

If the name is used in the document itself, you can use the StyleRef Field.

If it is put into a Content Control in your document, you can map that CC and put a duplicate in the header. Repeating Data Using Document Property Content Controls and Other Mapped Content Controls

Was this answer helpful?

0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2021-01-15T14:38:15+00:00

    I'm talking about the Header.  I have a header in the top right corner of my template for the client name.  I want to know if there is a way for the header to automatically update to the new file name when the template is saved using "save as" > lastname, firstname.  

    Here is my header in the template.  When the template is saved using the client's name as the new file name, is there a way for the header to automatically update without manually changing the header.  The template is locked and I don't want anyone unlocking it to manually change it.

    Was this answer helpful?

    0 comments No comments
  2. Charles Kenyon 167.8K Reputation points Volunteer Moderator
    2021-01-14T23:17:17+00:00

    Header or Heading?

    What is the difference between headings and headers?

    Filename field?

    StyleRef Field?

    Print Preview to update fields.

    What you want to do can be done using a macro but a lot more information would be needed.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2021-01-14T15:39:54+00:00

    Hi rhavey,

    Unfortunately, as far as I know, there is no such an OOB method to achieve what you want.

    Not sure if this could be consider as a workaround:

    1.In the header, go to Insert > Quick parts> Document Properties > Select either Title or Subject.

    2.If the user need to change the name in the header, the can update the information in the File > Info > Title or Subject. And the changed information will also reflect in the header.

    This is the workaround I could imagine for now, if the other members has another opinion, please kindly share it with us here.

    Regards,

    Alex Chen

    Was this answer helpful?

    0 comments No comments