Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word VBA

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 09-14-2017, 06:21 AM
Lou Melo Lou Melo is offline Windows 10 Office 2016
Novice
 
Join Date: Sep 2017
Posts: 4
Lou Melo is on a distinguished road
Exclamation How create new camps on a locked word form

I have a locked form in Word that we use to others departments at enterprise send us some needed information.


In one form I have the needed that some camps be repeated if the users want.

The archive attached is one exemple of my form.
The camps below
"Título do apontamento"
"Manifestação da área responsável"
"Plano de Ação" e
"Data do Prazo de Implementação Final Previsto"
Could be reportly a lot of times, because the department have a lot of "Títulos do apontamento" so I need some way that these camps could be created a lot of times in the locked form, by the users as they need.

Can you help me?

(English is not my first languange and I have lots of dificulties to express myself, hope you can understant me.)
Attached Files
File Type: pdf word form exemple.pdf (241.5 KB, 4 views)
Reply With Quote
  #2  
Old 09-14-2017, 02:26 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,352
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

It's not clear whether you want to replicate the entire table or just the "Títulos do apontamento" row (and you have two of those, in different parts of the form). Either could be done. If you can clarify your requirements an attach an actual document to a post, I'm sure we could work something out.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 09-15-2017, 12:52 PM
Lou Melo Lou Melo is offline Windows 10 Office 2016
Novice
 
Join Date: Sep 2017
Posts: 4
Lou Melo is on a distinguished road
Smile

Quote:
Originally Posted by macropod View Post
It's not clear whether you want to replicate the entire table or just the "Títulos do apontamento" row (and you have two of those, in different parts of the form). Either could be done. If you can clarify your requirements an attach an actual document to a post, I'm sure we could work something out.
Macropod,

I've made an better example, it's attached.

I want to replicate all the rows in orange destak, only they, and all together.

So... if some departament need to report they manifestation for more than one "Título do Apontamento", they will need to 'creat new manifestation' and all these 4 rows have to be replicated.

Just to be clear, I need a solution that permits the creation of news rows ( the exactly four rows in orange), when its needed, in a blocked Word form.
Attached Files
File Type: docx EXAMPLE FORM.docx (38.4 KB, 1 views)
Reply With Quote
  #4  
Old 09-15-2017, 05:09 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,352
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Your document contains a mix of formfields and content controls. These should not be used together as they were not designed to work that way and can lead to inconsistent behaviour. Furthermore, I can't do anything with your attachment as it has 'filling in forms' protection applied with a password.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #5  
Old 09-18-2017, 04:58 AM
Lou Melo Lou Melo is offline Windows 10 Office 2016
Novice
 
Join Date: Sep 2017
Posts: 4
Lou Melo is on a distinguished road
Post

This form is a way which other departments must fill out as information that my department needs. That is why we control the content, this is necessary. I am in Brazil, if I let them fill what they want, they will do it in the worst possible way.

If I do not use this type of formfields and content controls what do you suggest it be used for?

I sending a form again, withou the password. If you can help me... I appreciate.
Attached Files
File Type: docx EXAMPLE FORM_2.docx (38.3 KB, 2 views)
Reply With Quote
  #6  
Old 09-18-2017, 04:37 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,352
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Having content controls or formfields is OK; you just shouldn't use both in the same document. Attached is a revision of your document using only content controls, plus the macro which runs when you exit the "Data do prazo" content control. you will probably want to change the placeholder text for the content controls I added and the prompt to add new rows. You can access the macro code via Alt-F11. If you are going to use 'filling in forms' password protection, you'll need to include that in the macro code where indicated.
Attached Files
File Type: docm EXAMPLE FORM_2.docm (59.2 KB, 11 views)
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #7  
Old 09-20-2017, 12:21 PM
Lou Melo Lou Melo is offline Windows 10 Office 2016
Novice
 
Join Date: Sep 2017
Posts: 4
Lou Melo is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Having content controls or formfields is OK; you just shouldn't use both in the same document. Attached is a revision of your document using only content controls, plus the macro which runs when you exit the "Data do prazo" content control. you will probably want to change the placeholder text for the content controls I added and the prompt to add new rows. You can access the macro code via Alt-F11. If you are going to use 'filling in forms' password protection, you'll need to include that in the macro code where indicated.
Man, you look it appears so easy that make me feel so dumb. But Okay, I'm.

Thats exectly what we need, very very very thanks.

But, we've made some tests here, with the solution you gave us, and we observed some inconsistencies like:

Sometimes, when you creat new rows, the message box only runs if info on "data do prazo" will be the same of the previous one.

Other times, when you creat a lot of new rows the macro code stop to runs in the last one, and keep running only at in the first "data do prazo" row.

So we try some solutions, modificated some things on the macro code, but nothing solve the problem.

A colleague made a suggestion that we can make a button to create the rows, like the example attached.
But we cant make it happen... can you try help us again?
Attached Files
File Type: docm EXAMPLE FORM_3.docm (48.8 KB, 0 views)
Reply With Quote
  #8  
Old 09-20-2017, 02:57 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,352
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Quote:
Originally Posted by Lou Melo View Post
But, we've made some tests here, with the solution you gave us, and we observed some inconsistencies like:

Sometimes, when you creat new rows, the message box only runs if info on "data do prazo" will be the same of the previous one.

Other times, when you creat a lot of new rows the macro code stop to runs in the last one, and keep running only at in the first "data do prazo" row.
OK, I've fixed those problems, try the new attachment.
Attached Files
File Type: docm EXAMPLE FORM_2.docm (60.8 KB, 5 views)
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Tags
camps, form
Please reply to this thread with any new information or opinions.

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I create form entry for a word document trw92a Word 2 01-17-2016 07:11 PM
How do I create a Word form that can be emailed when a button is clicked? jayjay Word VBA 1 07-07-2015 09:31 PM
Create Table Form from Word Document gsj224 Word VBA 3 07-31-2011 09:26 AM
How to Create a Locked Sequence of Buttons kcackin PowerPoint 0 01-24-2011 02:43 PM
How can create a form in Word 2007 that can be automatically filled? artistech Word 0 08-04-2010 01:05 PM


All times are GMT -7. The time now is 03:01 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft