K
Kelw
I have created a macro that takes over the functionality of the
shortcut for Updating fields (F9).
If any part of a certain section is selected when they press F9, I want
another macro to run, which it does successfully.
My problem is getting word to update fields as you would expect it to
normally using VBA.
You can normally put your cursor in any part or a field/TOC, and it
will update that field when you press F9.
If I record a macro, I get Selection.Fields.Update. If I use this in
VBA, it doesn't think that any fields are selected, so nothing gets
updated.
Can anyone help me to find out if the cursor is in a field, and to then
update the field if it is.
Many thanks, KelW
shortcut for Updating fields (F9).
If any part of a certain section is selected when they press F9, I want
another macro to run, which it does successfully.
My problem is getting word to update fields as you would expect it to
normally using VBA.
You can normally put your cursor in any part or a field/TOC, and it
will update that field when you press F9.
If I record a macro, I get Selection.Fields.Update. If I use this in
VBA, it doesn't think that any fields are selected, so nothing gets
updated.
Can anyone help me to find out if the cursor is in a field, and to then
update the field if it is.
Many thanks, KelW