#1
|
|||
|
|||
Ensure that a form has been completed
Hello all,
I hope you are well. I have a form with three different lines: Name: Itīs a rich text content control Surname: Itīs a rich text content control Start date: Itīs a date picker content control I would like to write a macro that checks if all the fields of the form (name, surname, and start date) have been filled. If they have been filled in, I want a message to pop up saying Ready to be printed; if any of the fields have not been completed, I want a message to pop up saying Please complete all the fields. Then, when people fill in the form, they can run the macro to ensure they haven't missed any fields before printing it out. The form will contain more fields in the future, so I would like a macro that could work with any new fields that I may add to the form. For better understanding, I am attaching an example of the form Thanks! |
#2
|
|||
|
|||
Validate Content Controls Entries may give you some guidance.
|
#3
|
|||
|
|||
Hi Charles,
Thank you for your reply and your help. Unfortunately, I am not great at coding, so it will take me a while to tailor the macro from the website you shared to what I need. Would it be possible to not use content controls? i.e., just to create a macro that verifies whether the information next to the fields Name, Surname, and Start Date is blank or not? Name: Surname: Start date: Thanks again! |
#4
|
|||
|
|||
Content Controls are absolutely the simplest method.
Is the form being filled out in the desktop Word program? I expect that someone else will be along to give you the code you need. Please be patient. I do not have code already written and am not the best person to be writing it for you. "Field," in Word jargon is a term of art. Fields are an old technology.
|
#5
|
|||
|
|||
Why are any of these Rich Text Content Controls rather than Plain Text CCs?
You cannot use the Tab key to move out of Rich Text Content Controls. |
#6
|
|||
|
|||
Quote:
The form is filled out in the desktop app. Apologies if I am not being using the right word as English is not my first language. I believe, that the right word to use should be placeholder. |
#7
|
|||
|
|||
Quote:
I thought you could use the tab key to move out of them. Then, a plain one should work as I donīt need a specific format for the content. |
#8
|
|||
|
|||
The Rich Text control is for when you want to have multiple formats or other Content Controls within. You can do that and set the control so that it can't be deleted.
You can require a certain style in a Plain Text Control. What I usually do is just insert the control and then apply what formatting I want to the entire control if I did want some special formatting. In my experience, such formatting works fine. I would use the CC property of a certain style only if I wanted it to keep that style no matter what the user wanted to do. |
#9
|
|||
|
|||
Once again, thanks for your help.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Content Control Boxes Print on Completed Form | Lambchop6 | Word | 2 | 04-05-2017 05:16 PM |
Disable email function of command button if all form fields are not completed | derajlance | Word VBA | 10 | 05-11-2016 01:05 PM |
ensure I have an 8.5x11 sheet | Taylor | Word | 3 | 10-09-2011 12:39 AM |
How to ensure that each line ends only at the margin | sparemejava | Word | 9 | 02-06-2011 03:21 PM |
Convert a completed form to verbalized text | tsttm | Word | 0 | 07-09-2010 05:07 AM |