Hi, thank you for help, i want to done it in this way, below is code that do same thing in excel, i like same code for word.
Private Sub CommandButton4_Click()
Dim PicLocation As String
Dim MyRange As String
ActiveSheet.Unprotect
Range("A9").Select
MyRange = Selection.Address
PicLocation = Application.GetSaveAsFilename("C:\", "Image Files (*.jpg),*.jpg", , "Specify Image Location")
If PicLocation <> "False" Then
ActiveSheet.Pictures.Insert(PicLocation).Select
Else
Exit Sub
End If
With Selection.ShapeRange
.LockAspectRatio = msoTrue
If .Width > .Height Then
.Width = Range(MyRange).Width
If .Height > Range(MyRange).Height Then .Height = Range(MyRange).Height
Else
.Height = Range(MyRange).Height
If .Width > Range(MyRange).Width Then .Width = Range(MyRange).Width
End If
End With
With Selection
.Placement = xlMoveAndSize
.PrintObject = True
End With
Range("H16").Select
ActiveSheet.Protect
End Sub