Hi guys
I am writing the following code to insert a table in word document using access vba . I want to display 2 columns in a table i.e assessment questions and the scoring against each question . My code displays the assessment questions in the table but scoring doesn't get displayed. Any help will be much appreciated .
The above code displays the scoring of each assessment question in the message box but doesn't show it on word document . I have made sure that that the bookmark exists in the word document .
Please can anyone help me in this ?
Thanks
I am writing the following code to insert a table in word document using access vba . I want to display 2 columns in a table i.e assessment questions and the scoring against each question . My code displays the assessment questions in the table but scoring doesn't get displayed. Any help will be much appreciated .
Code:
Set bk=wd.Bookmarks("InsertTable")
Set wt=wd.tables.add(bk.range,1,2)
Wt.columns(1).width=400
wt.columns(2).width=50
Do until .eof
Msgbox .fields(1)
Set wr=wt.rows.add
Wr.cells(1).range.text=.fields(0)
Wr.cells(2).range.text=.fields(1)
.movenext
Loop
The above code displays the scoring of each assessment question in the message box but doesn't show it on word document . I have made sure that that the bookmark exists in the word document .
Please can anyone help me in this ?
Thanks