I want to populate my UserForm with the contents of a document. I would like
to have something like what is below. Any ideas?
TextBox1.Text = Bookmark "LastName"
TextBox1.Text = ActiveDocument.Bookmarks("LastName").Range.Text
Also, it's worthwhile either to use the construction
If ActiveDocument.Bookmarks.Exists("LastName") Then
TextBox1.Text = ActiveDocument.Bookmarks("LastName").Range.Text
End If
or to use the line
On Error Resume Next
or something similar to trap the error if the bookmark doesn't exist.
--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.