Hi all,
I am wondering how to go to a bookmark in Word when its macro is ran from Excel. This is what I have in Excel at the moment:
Code:
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Dim i As Integer
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Open(directory)
With wrdDoc
If .Bookmarks.Exists("g") Then
MsgBox "yes"
wrdDoc.GoTo What:=wdGoToBookmark, Name:="g"
Else
MsgBox "Not Found"
End If
It all works, except the Word document does not go to the bookmark. After this I am hoping to expand on the code (such as adding Word Tables from the Excel code). Input appreciated.
Thank you,
Matt