Re: MS Word: how to get a list of graphics

Subject: Re: MS Word: how to get a list of graphics
From: Geoff Lane <geoff -at- GJCTECH -dot- FORCE9 -dot- NET>
Date: Wed, 9 Jun 1999 19:19:11 +0100

Jessica,

The following should do it:

Sub ListLinkedPics()
Dim i As Integer
Dim PicSource As String
For i = 1 To ActiveDocument.InlineShapes.Count
PicSource = LinkPath(i)
If Len(Trim(PicSource)) > 0 Then
MsgBox PicSource
End If
Next
End Sub

Function LinkPath(ByVal PicNum As Integer) As String
On Error GoTo err_LinkPath
LinkPath = ActiveDocument.InlineShapes(PicNum).LinkFormat.SourceFullName
Exit Function
err_LinkPath:
LinkPath = ""
Exit Function
End Function

Note that you need both the function and the subroutine. In a nutshell, the
function attempts to retrieve the full name and path of the picture. The
error handler caters for embedded pics, setting the returned value to an
empty string.

In the subroutine, replace MsgBox PicSource with your own code.

HTH,

Geoff Lane
Cornwall, UK
geoff -at- gjctech -dot- force9 -dot- net
-----Original Message-----
From: Jessica N. Lange

We link graphics (rather than embed them) in our Word documents. Does anyone
know of a way to generate a list of the graphics used in the document? Could
a macro do this?

From ??? -at- ??? Sun Jan 00 00:00:00 0000=




Previous by Author: Re: Problem with Styles in MS Word
Next by Author: Re: CorelDraw Q
Previous by Thread: MS Word: how to get a list of graphics
Next by Thread: Re: MS Word: how to get a list of graphics


What this post helpful? Share it with friends and colleagues:


Sponsored Ads