A family of Microsoft word processing software products for creating web, email, and print documents.
See the following pages of fellow MVP Graham Mayor's website:
http://www.gmayor.com/boilerplate\_add\_in.htm
and
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi.
I'm attempting to create a document that will populate information based upon choices made in a drop down box. I've been able to make this work with the instructions from this page: http://www.gmayor.com/SelectFile.htm but the problem is that the document needs to be unrestricted because there are fields that another program fills in.
Is there any way to make this work without requiring end users to manually restrict editing of the document? Alternatively is there a way to create a macro that would restrict editing with a single button?
In short, I need an editable document that can populate text based upon a drop down option. We're on Office 2013. Thanks for your help.
A family of Microsoft word processing software products for creating web, email, and print documents.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
See the following pages of fellow MVP Graham Mayor's website:
http://www.gmayor.com/boilerplate\_add\_in.htm
and
Here is the abstract-- Our practice currently uses a separate document for every procedure performed. This is somewhere around 50 different documents. The staff sometimes messes things up and generally it's a real bother for them to go in and switch document templates for every client. The dictate passed down to me on this project was "we want a single document that can work for every procedure we offer." The beginning of the document is standard, boilerplate for every client and contains the codes which are filled in by the practice management software. The part where the dropdowns come in is after that. The surgeons write up or copy/paste information for the clients and referring vets that can be between a few paragraphs and several pages worth of information. They wanted this information to "just appear" when they choose an option from a drop down menu, and that's how I ended up at this point. I'm sure there must be a better way, but given the very specific constraints that our practice management software places on us as far as the way that it interfaces with Word docs, I'm just happy to have something that works with a few extra button presses.
I'm deeply appreciative of your help and wish you the best.
With gratitude,
Ryan
I am not sure what you actually mean by "populate information based upon choices made in a drop down box." If the "information" is one of the items in the dropdown box, rather than some other text which is inserted based on the item selected, you could use a combobox Content Control, which does not require that the document be protected for filling in forms.
Thank you very much, Doug. They're fields that are being read and filled in by a veterinary practice management program. Word isn't doing the lifting in that case, the program itself reads the documents as a template and replaces stuff like <patient_info>, <weight>, <breed>, etc... That's why it can't be protected without causing the program to error-out because of the program itself runs through the doc and fills in the "mergewords".
The program also isn't smart enough to use more than one type of .doc format, so using anything that would require a .docm was also right out. The macro toggle you provided is about the best option that we have given the constraints in place. Thanks again for your help. It's deeply appreciated, sir.
What type of fields are being filling in by the other program?
If that program was setting the values of document variables and the data was displayed in DOCVARIABLE fields, the document could remain protected.
However, a macro containing the following code will toggle the protection state each time it is run
With ActiveDocument
If .ProtectionType = wdNoProtection Then
.Protect wdAllowOnlyFormFields, NoReset
Else
.Unprotect
End If
End With