|
以下是本人录制的一个WORD宏: 调整图片尺寸,并删除.JPG,如何修改才能满足以下要求: 调整鼠标之后的图片尺寸为2.55*3.39inch,删除鼠标之后的 .JPG,并保持鼠标停留在原位不变 (注: 鼠标后的所有内容均未选择)。请高手帮助修改一下,谢谢!
Sub Adjust_ImageSize()
'
' Adjust_ImageSize Macro
'
'
Dim i As Integer
For i = 2 To ActiveDocument.InlineShapes.Count
With ActiveDocument.InlineShapes(i)
.Height = 2.55 * 2.54 * 28.35
.Width = 3.39 * 2.54 * 28.35
.Borders(wdBorderTop).LineStyle = wdLineStyleSingle
.Borders(wdBorderTop).LineWidth = wdLineWidth050pt
.Borders(wdBorderTop).Color = wdColorAutomatic
End With
Next i
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ".JPG"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
|
|