Hi all,
I have to capture many computer screen, and put it into one word file for my boss checking daily.
I used to printscreen, paste to the Word, and manually crop and resize the pictures.
I am self-studying VBA and just found the below VBA code from Microsoft which might be useful for me.
https://docs.microsoft.com/zh-tw/off...ureformat.crop
To fit my situation, i have made some adjustment as below.
---
Sub CropNResize()
Dim myInlineShape As InlineShape
Dim myCrop As Crop
Set myInlineShape = ActiveDocument.InlineShapes(1)
Set myCorp = myInlineShape
With myCorp
.PictureFormat.CropLeft = 0
.PictureFormat.CropTop = 60
.PictureFormat.CropRight = 870
.PictureFormat.CropBottom = 370
.LockAspectRatio = True
.Height = 293
End With
Set myInlineShape = ActiveDocument.InlineShapes(2)
Set myCorp = myInlineShape
With myCorp
.PictureFormat.CropLeft = 0
.PictureFormat.CropTop = 60
.PictureFormat.CropRight = 870
.PictureFormat.CropBottom = 370
.LockAspectRatio = True
.Height = 293
End With
End Sub
Assuming if i have 100 pictures today, is there any method to cropNresize the images in few lines of command instead of repeating shape(1) shape(2)... shape(100)?
Thanks a lot.