The macro recorder is only a tool good for giving you an idea of what the
macro should contain. It's not useful for actually creating serious macros
(as you've discovered!) ...
With Selection.InlineShapes.AddPicture(FileName:="C:\SIMPOW\....")
.Width = 425.2
.Height = 601.5
.Range.InsertCaption Label:=wdCaptionFigure,
Position:=wdCaptionPositionBelow
End With
>I am attempting to write a macro that does the following:
>
[quoted text clipped - 25 lines]
> Selection.TypeText Text:=":"
> End Sub
n o s p a m p l e a s e - 11 Mar 2006 14:47 GMT
> With Selection.InlineShapes.AddPicture(FileName:="C:\SIMPOW\....")
> .Width = 425.2
> .Height = 601.5
> .Range.InsertCaption Label:=wdCaptionFigure,
> Position:=wdCaptionPositionBelow
> End With
Thank you. I attempted to generalise your code for two figures as
below:
With Selection.InlineShapes.AddPicture(FileName:="C:\SIMPOW\Fig1.eps")
.Width = 425.2
.Height = 601.5
.Range.InsertCaption Label:=wdCaptionFigure,
Position:=wdCaptionPositionBelow
End With
With Selection.InlineShapes.AddPicture(FileName:="C:\SIMPOW\Fig2.eps")
.Width = 425.2
.Height = 601.5
.Range.InsertCaption Label:=wdCaptionFigure,
Position:=wdCaptionPositionBelow
End With
It does insert two figures and resizes them but puts all captions for
both figures in the end and NOT after each figure.
Any suggestions! Thank you/NSP