DanDarwood2004
Programmer
I am successfully updating fields within the header of a document using the below code:
but the problem I am having is that my header contains an image and when this code runs the image is removed/deleted. I have tried various images and placement in the header but the same thing happens. Can anyone help or have any ideas of what to try?
Thanks,
Dan.
Code:
Dim myStoryRange
For Each myStoryRange In objWord.StoryRanges
myStoryRange.Fields.Update
While Not (myStoryRange.NextStoryRange Is Nothing)
Set myStoryRange = myStoryRange.NextStoryRange
myStoryRange.Fields.Update
Wend
Next myStoryRange
but the problem I am having is that my header contains an image and when this code runs the image is removed/deleted. I have tried various images and placement in the header but the same thing happens. Can anyone help or have any ideas of what to try?
Thanks,
Dan.