Code: Select all
Dim strBookmark As String
strBookmark = InputBox("")
If Not ActiveDocument.Bookmarks.Exists(strBookmark) Then
End If
Set rng = ActiveDocument.Bookmarks(strBookmark).Range
If ActiveDocument.ProtectionType = wdAllowOnlyFormFields Then
ActiveDocument.Unprotect ""
End If
With Dialogs(wdDialogInsertPicture)
.Display
If .Name <> "" Then
sFileName = .Name
Set ilImage = ActiveDocument.InlineShapes.AddPicture(sFileName, , True, rng)
With ilImage
.Height = Application.InchesToPoints(1.35)
.Width = Application.InchesToPoints(1.5)
End With
End If
End With
ActiveDocument.Protect wdAllowOnlyFormFields, True, ""
This can sometimes be a pain, especially if I was working on page 21, I would then have to scroll all the way back down after photo was inserted to bookmark. Is there any way to keep at same location when photo is inserted?