Hello
I am having a problem with Application.Screenupdating = False does not seem to work.
When my macro runs i get a message Word is updating the field codes in the document. My macro is updating the field codes of the documents.
I have tried setting screenupdating, displayalerts, displaystatusbar = false but i still get the message and it shows the macro going to the next doc.
I have tried moving the screenupdating, displayalerts, displaystatusbar to different parts of the doc but i still get this.
[VBA]
Sub UpdateStoryRanges(CurrentDoc As Document)
'Loop to update the main body of the document
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.DisplayStatusBar = False
For Each oStory In CurrentDoc.StoryRanges
'Update the all the FormFields
oStory.Fields.Update
If oStory.StoryType < wdMainTextStory Then
'Loop through main body of document until all fields are updated
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Fields.Update
Wend
End If
Next oStory
Set oStory = Nothing
End Sub
[/VBA]