Thread: [Solved] Text Form Field & REF Field
View Single Post
 
Old 08-09-2017, 04:28 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Form fields only work in documents with 'filling in forms' protection applied. Unless your VBA code was changing the formfield's default property, anything you do to update the formfield would erase its contents. As it is, the error you're getting suggests that you're not writing to the formfield but are instead overwriting it and, hence, deleting its bookmark.

Instead of writing to formfields, you could just write the data to a bookmark (not just insert it at a bookmarked location), and cross-reference that bookmark. For code to update Word bookmarks correctly for that, see: https://www.msofficeforums.com/word-...html#post67058
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote