Simpler is not to use the selection at all --
ActiveDocument.Fields.Update
will have the same effect. Either way, you're not updating fields in any
storyrange except the main body (ie not in headers or footers, textboxes,
footnotes, etc). If you need to update fields everywhere --
Dim pRange as Word.Range
For each pRange in ActiveDocument.StoryRanges
Do
pRange.Fields.Update
set pRange = pRange.NextStoryRange
Loop until pRange is nothing
Next
>I am using a macro to select all, then alt+9 to update fields in my
> doc. It works just fine, but when finished, the doc is still
[quoted text clipped - 3 lines]
> Much thanks
> Joanne
Joanne - 28 Jul 2006 21:45 GMT
Thanks Jezebel - solved the problem perfectly.
I do have one more question please.
On the lost focus event of this embedded spreadsheet, can I call the
update macro from the main word doc? I'm not even sure that lost focus
is allowed in Excel VBA or if there is some other command available
for when I exit the spreadsheet and return to the word doc. Can you
point me in the right direction please.
Thanks muchly
Joanne
>Simpler is not to use the selection at all --
>
[quoted text clipped - 19 lines]
>> Much thanks
>> Joanne