Hi
I'm using Word 2000 and have created a document which includes form fields.
Is there any way I can make sure that no fields are left blank, I.e, a message that prompts the user to complete any missing fields?
Thanks in anticipation
Brian
Hi
I'm using Word 2000 and have created a document which includes form fields.
Is there any way I can make sure that no fields are left blank, I.e, a message that prompts the user to complete any missing fields?
Thanks in anticipation
Brian
Hi,
Hope this help, MarkoIf ActiveDocument.FormFields("Field_1").Result = "" Then MsgBox "Field_1 is empty" Else 'check all fields ... End If
The following code, when placed in the ‘ThisDocument’ module, prevents the document being closed if it contains any formfields that have not been filled in.
Private Sub Document_Close() Dim oFld As Formfield For Each oFld In ActiveDocument.Formfields If Trim(oFld.Result) = "" Then MsgBox "Please complete all the items" ThisDocument.Reload Exit Sub End If Next End Sub
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Thanks very much, excellent.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks