Word Switch Question - Progamming RRS feed

  • Question

  • Hello,

    I’ve Bookmarked 3 fields in a word document that uses a Word Field Switch to get a value based on multiple conditions.  My problem is - it doesn’t seem to refresh properly and especially if dropdowns already have values (meaning someone is just looking to update). I tried the F7 update but that doesn’t seem to work either.  My only other solution would be a macro set to Document and “On Open” and I’m hoping someone can help modify one I found that was originally created by Graham Mayor.

     So instead of every field being refreshed, I’m just looking to update the 3 that will change.  My Bookmarked names for the 3 are  ESPP, Stock and DD.

     Any ideas on how to modify the below to update just for those 3 values?

     Thanks in advance – Jenny B.


     Sub UpdateAll()

    Dim oStory As Range

    Dim oField As Field

     For Each oStory In ActiveDocument.StoryRanges

     For Each oField In oStory.Fields


     Next oField

     Next oStory

    End Sub

    Saturday, June 18, 2011 7:45 PM

All replies

  • I think you need to provide more detail on how this is set up and what you expect should happen.

    What do you mean by "a Word Field Switch"? Please elaborate.

    F7 isn't going to update any fields; F9 updates fields. Perhaps if you try that...?

    Cindy Meister, VSTO/Word MVP
    Sunday, June 19, 2011 1:25 PM