Hello,
After a mailmerge with a document containing INCLUDEPICTURE fields, it is necessary to refresh the document by pressing F9 in Word.
To avoid that, I coded "lole_doc.Fields.Update" after the mailmerge.execute in my Powerscript mailmerge function. It works BUT only on the first story.
To make the update on each story, I would like to mimic that VBA macro in Powerscript :
Sub UpdateAllFieldsInDocument()
Dim rngStory As Range
'Iterate through all stories and update fields
For Each rngStory In ActiveDocument.StoryRanges
If Not rngStory Is Nothing Then
'Update fields directly in story
rngStory.Fields.Update
End If
Next rngStory
End Sub
Unfortunately I don't know how to replic that loop on each story.
Does someone know that ?
Thank you very much by advance !
Pierre.