<strong>Code:</strong>
Sub
GrafikTest()
Dim
Verz
As
String
Dim
Bild
As
InlineShape
Dim
Breite
As
Single
Dim
Hoehe
As
Single
Dim
Altverz
As
String
Dim
AbbText
As
String
Dim
Antwort
Verz = ActiveDocument.Path + "\Bilder\"
Altverz = Options.DefaultFilePath(Path:=wdPicturesPath)
Options.DefaultFilePath(Path:=wdPicturesPath) = Verz
Dialog BildEinfuegen, Verz +
"*.*"
For
Each
Bild
In
ActiveDocument.InlineShapes
If
Bild.AlternativeText <>
"belegt"
Then
Breite = Bild.Width
Bild.
Select
Hoehe = Bild.Height
Bild.Width = 340.5
Bild.Height = 340.5 / Breite * Hoehe
Bild.AlternativeText =
"belegt"
Bild.
Select
Selection.InsertCaption Label:=
"Abb."
, TitleAutoText:= _
""
, Title:=
": Pos. "
, Position:=wdCaptionPositionBelow, _
ExcludeLabel:=0
End
If
Next
Options.DefaultFilePath(Path:=wdPicturesPath) = Altverz
End
Sub