SolvedPrivate

Create MS Word form issue

Posted on 2015-01-31
4
10 Views
Last Modified: 2016-02-12
Hi,

Two questions:

Q1
I use MS Word 2010 to create a form and protect it, everything is fine, but I was wondering when I choose "Plain text Content control" or "Rich text content control", it doesn't allow me to restrict the field, e.g. only type the number instead of character, max. 3 digits, etc., I know I can use "Text form field" under Legacy Forms to accomplish them, but my boss doesn't want to see the background grey area if I add "Text form field"

Q2
When I enabled form and protect it, how can I allow end user to update the header, because when I protect the form, the header is locked.


Any suggestion?
0
Comment
Question by:liyy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 12

Expert Comment

by:FarWest
ID: 40582217
I think you have to  use VBA to do that
here is an Example to validate content control (Textbox, Radio Button , ..etc)
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
If ContentControl.Title = "Test" Then
If Val(ContentControl.Range.Text) < 4 Then 'don't accept less than 4
Debug.Print ContentControl.Range.Text
Cancel = True
End If
End If
End Sub

Open in new window

0
 

Author Comment

by:liyy
ID: 40582240
Thanks FarWest,

I am newbie of VBA developer, how about If I would like to control the text field only accept number and max 3 digits, thanks
0
 
LVL 12

Accepted Solution

by:
FarWest earned 500 total points
ID: 40582517
if you mean the field will force user to input  numbers with specific digits, this was before with maskedit control (I can't see it now), but if you mean the field will reject loosing focus until user entered valid data then it can be done by code above using >, <  operators
if you need help on how to add vba just press alt-f11 to open code editor and make sure that you are on "ThisDocument" in object explorer at the left window

Regards
0
 

Author Comment

by:liyy
ID: 40641626
sorry for the late, I temporarily accept it and I will post it if I got the problem again.
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question