Share via

VBA code and DocVariables in a Word doc

Anonymous
2017-08-23T19:23:07+00:00

Hi All,

I can't find an answer to this in the forums. I probably didn't search nearly long enough, but I need to get back to work.

I have a Version table in my Word documents. This contains Version Number, Date, and the Name of the person who updated the document. Every time someone updates the document, they increment the Version Number (1.0, 1.1, 1.2, etc.) and they often forget to update the version number on the cover page and/or the document footer.

What I want to do is create some VBA code that will trigger whenever the Version table is updated, find the max in the Version Number column, and store that value in a document variable to be used as a field in the cover page and the document footer.

Is this doable in Word? Can anyone give me a push in the right direction?

Thanks,

MarvinM

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

1 answer

Sort by: Most helpful
  1. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2017-08-23T19:35:29+00:00

    It would be easiest to use a Content Control into which the user would insert the version number and then by using the information on the following pages of Greg Maxey's website, have that information replicated on the cover page

    http://gregmaxey.com/word\_tip\_pages/repeating\_data.html

    http://gregmaxey.com/word\_tip\_pages/mapped\_content\_controls.html

    Was this answer helpful?

    0 comments No comments