Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Aug 2010
    Location
    Bramham, West Yorkshire, England
    Posts
    59
    Thanks
    34
    Thanked 0 Times in 0 Posts

    Unhappy Word Count on Word 2013 - Auto-update on save

    I am looking for a way of updating the NumWords field in Word 2013. I have the field as a word Count in the footer of my document, and the only way I can see that it can be updated is to right-click the field and select the 'Update field' option. I would like the field to update, whenever I clikc on the save icon on the Ribbon or Quick Access toolbar. Alternatively, and this may be the better option, a macro that I could assign to a button, that would update this field. I've done the obligatory Google search, but nothing seems to be fit for purpose. Any help would be most appreciated.
    Tony.

  2. #2
    Star Lounger
    Join Date
    Aug 2010
    Location
    Bramham, West Yorkshire, England
    Posts
    59
    Thanks
    34
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by hubyster View Post
    I am looking for a way of updating the NumWords field in Word 2013. I have the field as a word Count in the footer of my document, and the only way I can see that it can be updated is to right-click the field and select the 'Update field' option. I would like the field to update, whenever I clikc on the save icon on the Ribbon or Quick Access toolbar. Alternatively, and this may be the better option, a macro that I could assign to a button, that would update this field. I've done the obligatory Google search, but nothing seems to be fit for purpose. Any help would be most appreciated.
    Tony.
    Just when you think you have tried everything, along come someone with this:

    Sub MyUpdateFields1()

    ActiveDocument.StoryRanges(wdPrimaryFooterStory).F ields.Update

    End Sub


    Job done (sort of) Thanks to anyone who had a look.
    Tony

  3. #3
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    A alternative that updates field in the document body and all headers & footers is given below:
    Code:
    Sub UpdateFields()
    Application.ScreenUpdating = False
    With ActiveDocument
      .Fields.Update
      .PrintPreview
      .ClosePrintPreview
    End With
    Application.ScreenUpdating = True
    End Sub
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •