
Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
The document which is created from the test.doc is a protected document. here
is the code:
*******************************
Sub CheckValidDate()
On Error Resume Next
Set thisDoc = Application.ActiveDocument
If thisDoc.FormFields("txtThisDate").result = "" Then
MsgBox "Please Enter the ""Date This Appraisal"" Field.", vbOKOnly +
vbExclamation, _
"Missing Information Message"
thisDoc.FormFields("txtThisDate").Select
End
Else
If CDate(thisDoc.FormFields("txtThisDate").result) >
CDate("12/24/2006") Then
blNewPro = True
Call ShowNewPACE
Else
blNewPro = False
If blFirstTime = True Then
blFirstTime = False
Else
Call ShowOldPACE
End If
End If
End If
If thisDoc.FormFields("txtLastDate").result = "" Then
MsgBox "Please Enter the ""Date Last Appraisal"" Field.", vbOKOnly +
vbExclamation, _
"Missing Information Message"
thisDoc.FormFields("txtLastDate").Select
End
ElseIf CDate(thisDoc.FormFields("txtThisDate").result) <= _
CDate(thisDoc.FormFields("txtLastDate").result) Then
MsgBox """Date This Appraisal"" must be greater than ""Date Last
Appraisal"".", vbOKOnly + vbExclamation, _
"Invalid Information Message"
thisDoc.FormFields("txtThisDate").Select
End If
End Sub
*******************
It's called when exit the text form fileld.
Thanks.
> What does the macro do? Post the code?
> Is the form locked on the user's PC?
[quoted text clipped - 13 lines]
> >
> > Thank you for any help.
Doug Robbins - Word MVP - 24 Mar 2008 21:03 GMT
The user may have the macro security level set to high and if test.doc is
not in a trusted location, the macros in it would be automatically disabled.
Test.doc should be saved as a template (.dot file) and then should be copied
into the user template folder or the workgroup template folder and the use
should use File>New and then select the template as the basis for the
document that they want to create. That way, the macros in the template
will be available for use in the new document that the user creates.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> The document which is created from the test.doc is a protected document.
> here
[quoted text clipped - 67 lines]
>> >
>> > Thank you for any help.