![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Now that I have my forms completed and emails sending the way I need them to send, I want to tweak a few things.
Is there any way to disable the email function of a command button if all form fields are not completed? If not, is there a way to prevent moving to the next field until the one before it is filled out? I have figured out how to display an error upon exiting the form field with the following code: Code:
Sub ExitText1()
With ActiveDocument.FormFields("Text1")
If Len(.Result) < 1 Then
Application.OnTime When:=Now + TimeValue("00:00:001"), Name:="GoBacktoText1"
MsgBox "This is a required field."
End If
End With
End Sub
But this does not prevent the user from submitting the form and sending the email. Thanks in advance! |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Email from Command Button
|
derajlance | Word VBA | 6 | 05-05-2016 07:40 AM |
| Submit to Email Command Button | rob7676 | Word VBA | 0 | 08-20-2015 05:05 AM |
command button that generates a popup for sending email
|
oduntan | Word VBA | 4 | 03-21-2013 02:15 PM |
Command button - save in temp folder and send email with attachment
|
bigbird69 | Word VBA | 13 | 11-18-2012 10:06 PM |
Word VBA: How to create a command button and trigger a function?
|
tinfanide | Word VBA | 2 | 12-02-2011 05:51 AM |