Excel provides me a customized text in cell A1, which then should be passed on to a word letter at a specific section (after a bookmark).
Just started with VBA and found+edited a code that was able to provide half of the solution. Where I struggle is how to insert the text in cell A1 in sheet OutputText to the word document after the bookmark?
Here is my code so far:
Function FnBookMarkInsertAfter()
Dim objWord
Dim objDoc
Dim objRange
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open("C:\Users\[...]")
objWord.Visible = True
Set objRange = objDoc.Bookmarks("bookmark_1").Range
objRange.InsertAfter ("Cell A1 from Sheet OutputText")
End Function
Thank you!