Below is my code I need help with...when I hard code the values in for the bookmarks it works fine (like the date)...However...I want to be able to run a query and use the field names for the bookmark values...Please help...thanks.
Dim objword As Object
Set objword = CreateObject("word.application")
'DoCmd.OpenQuery "qryEventInfo", acViewDesign, acReadOnly
'objword.Visible = True
'objword.ActiveDocument.Bookmarks("Event_Location").Select
'insert the text into the bookmark
'***I would like the name of the field from the query here
'objword.selection.Text = "????????"
'objword.ActiveDocument.Bookmarks("Event_Date").Select
'insert the text into the bookmark
'***When I hard code the data it works fine
'objword.selection.Text = "test 8/1/2005"
________
Where To Upload Starcraft 2 Replay
Dim objword As Object
Set objword = CreateObject("word.application")
'DoCmd.OpenQuery "qryEventInfo", acViewDesign, acReadOnly
'objword.Visible = True
'objword.ActiveDocument.Bookmarks("Event_Location").Select
'insert the text into the bookmark
'***I would like the name of the field from the query here
'objword.selection.Text = "????????"
'objword.ActiveDocument.Bookmarks("Event_Date").Select
'insert the text into the bookmark
'***When I hard code the data it works fine
'objword.selection.Text = "test 8/1/2005"
________
Where To Upload Starcraft 2 Replay
Last edited: