R
Robin
I have a document and in the header of that document there are various
images. These have been inserted and linked. I can see the links in the Links
dialog. I have a script that should at least show the path and filename of
these images. It only does that for other images that are not in the header.
Nobne of the images in the document are inline, and while this script works
for the "body" images, it does not return any details on the "header" images.
Sub sd()
Dim myShape As Shape
For Each myShape In ActiveDocument.Shapes
MsgBox myShape.LinkFormat.SourcePath
MsgBox myShape.LinkFormat.SourceName
Next myShape
End Sub
Any suggestions why?
I have also tried something like this...
Sub x()
Dim s As Section
Dim j As Shape
For Each s In ActiveDocument.Sections
For Each j In s.Headers(wdHeaderFooterPrimary).Shapes
If j.Type = 15 Then
MsgBox j.LinkFormat.SourcePath
MsgBox j.LinkFormat.SourceName
End If
Next j
For Each j In s.Headers(wdHeaderFooterEvenPages).Shapes
If j.Type = 15 Then
MsgBox j.LinkFormat.SourcePath
MsgBox j.LinkFormat.SourceName
End If
Next j
Next s
End Sub
And this again returned nothing?
thanks
Robin
images. These have been inserted and linked. I can see the links in the Links
dialog. I have a script that should at least show the path and filename of
these images. It only does that for other images that are not in the header.
Nobne of the images in the document are inline, and while this script works
for the "body" images, it does not return any details on the "header" images.
Sub sd()
Dim myShape As Shape
For Each myShape In ActiveDocument.Shapes
MsgBox myShape.LinkFormat.SourcePath
MsgBox myShape.LinkFormat.SourceName
Next myShape
End Sub
Any suggestions why?
I have also tried something like this...
Sub x()
Dim s As Section
Dim j As Shape
For Each s In ActiveDocument.Sections
For Each j In s.Headers(wdHeaderFooterPrimary).Shapes
If j.Type = 15 Then
MsgBox j.LinkFormat.SourcePath
MsgBox j.LinkFormat.SourceName
End If
Next j
For Each j In s.Headers(wdHeaderFooterEvenPages).Shapes
If j.Type = 15 Then
MsgBox j.LinkFormat.SourcePath
MsgBox j.LinkFormat.SourceName
End If
Next j
Next s
End Sub
And this again returned nothing?
thanks
Robin