Excel VBA replace a bookmark in a word document with a picture
I would like to replace a bookmark inside a word document with a picture.
I have:
```
Sub makro()
Dim wApp As Object Dim wDoc As Object Dim bR As Object Dim b1 As String Dim b2 As String Dim fp As String Dim stuff As String
b1 = "Bookmark 1" b2 = "Bookmark 2" fp = "my file path" stuff = "some text"
Set wApp = CreateObject("Word.Application") wApp.Visible = True Set wDoc = wApp.Documents.Open(fp)
Set bR = wDoc.Bookmarks(b1).Range bR.text = stuff 'this is how I do it with text
Set bR = wDoc.Bookmarks(b2).Range '???
'I know of wDoc.Content.InlineShapes.Addpicture FileName:=filepath etc. but not how to apply it at the position of the bookmark.
Set wApp = Nothing Set wDoc = Nothing Set bR = Nothing
End Sub
```
Is there a simple way of replacing b2 with a picture, like I did with b1?
I might have missed some necessities in the code. Like closing/quitting the word document and application, but that is irrelevant to the question and I can figure that out on my own.
I would appreciate any ideas and suggestions.
I use Office 365.