I have been given a Word Document which contains a number of form fields. When you look in the properties each has been given a bookmark. In the past I have used routines which write text to bookmarks but in this case the reply is there are no bookmarks to write to. I have not written directly to formfields before. A test routine of my old style is given below.
How do I access the formfields and their bookmark and how do I write to them?
They are not all text fields. One is a checkbox formfield. How do I set this field?
With wordobj.Selection
.Goto what:=wdGoToBookmark, Name:="txtName"
.TypeText ("Test Name")
.Goto what:=wdGoToBookmark, Name:="txtAddline1"
.TypeText ("First line address")
.Goto what:=wdGoToBookmark, Name:="txtAddline4"
.TypeText ("Address line four")
End With
Thanks for any help.
How do I access the formfields and their bookmark and how do I write to them?
They are not all text fields. One is a checkbox formfield. How do I set this field?
With wordobj.Selection
.Goto what:=wdGoToBookmark, Name:="txtName"
.TypeText ("Test Name")
.Goto what:=wdGoToBookmark, Name:="txtAddline1"
.TypeText ("First line address")
.Goto what:=wdGoToBookmark, Name:="txtAddline4"
.TypeText ("Address line four")
End With
Thanks for any help.