Reply
 
Thread Tools Display Modes
  #1   Report Post  
AnttiK
 
Posts: n/a
Default Styles, text fields and protection problem.

My problem is in styles and in protecting document. I want to create a fax
template with styles and protection. I am using text form fields. My
protection settings are as follows: €śFormatting restrictions€ť checked,
€śEditing restrictions€ť is filling in forms and enforcing is enabled.

I have three different styles to use in one text field. I have body text for
normal text and two different kinds of headings. FaxHeading1 is for bigger
headings and FaxHeadings2 is for smaller headings (such as paragraph headings
etc.). All of styles are enabled in formatting restrictions list.

After this I cant anyhow change style in text form field. Field seems to
have that style which was used when I created the field and it can not be
changed afterwards.

Is there different kind of way to do this? It is very important that users
can not change headers, footers, address fields and layout.

Best regards from Finland.

Antti Koskalo
  #2   Report Post  
Jezebel
 
Posts: n/a
Default


Is there different kind of way to do this? It is very important that users
can not change headers, footers, address fields and layout.


Use a typewriter?

Seriously, what are you actually trying to do? WHY might your users change
the headers, footers, etc in ways you don't want?



  #3   Report Post  
AnttiK
 
Posts: n/a
Default


Seriously, what are you actually trying to do? WHY might your users change
the headers, footers, etc in ways you don't want?


Why they change layout? I don't know it even myself. They just do it. Maybe
because they think it's ok.

What I try to do:

I try to make protected document, which contains fields, where users can
type text. Text can be body text or two different type of heading texts.
Users are allowed to type only to specific areas (in this case text fiels)
and with those styles what I mentioned.

My question was, how can I make this kind of document ?

-Antti
  #4   Report Post  
Jezebel
 
Posts: n/a
Default


"AnttiK" antti.koksalo( at )vamp.fi wrote in message
...

Seriously, what are you actually trying to do? WHY might your users

change
the headers, footers, etc in ways you don't want?


Why they change layout? I don't know it even myself. They just do it.

Maybe
because they think it's ok.

What I try to do:

I try to make protected document, which contains fields, where users can
type text. Text can be body text or two different type of heading texts.
Users are allowed to type only to specific areas (in this case text fiels)
and with those styles what I mentioned.

My question was, how can I make this kind of document ?


It's called a "form", well documented in help.

Where your question becomes challenging is the issue of *preventing* users
screwing up your document. If you can assume that your users have no
malicious intent, there's no problem -- create a form in the usual way and
simply *ask* them not to muck around with it. Not even worth posting a
question about... just follow the examples in Help.

If you can't make that assumption you need to be *very* specific about what
you're trying to achieve.'Allowed' in the sense that getting it wrong will
literally kill people? -- (which is the case with some kinds of
documentation.)



  #5   Report Post  
AnttiK
 
Posts: n/a
Default

"Jezebel" kirjoitti:
It's called a "form", well documented in help.

Where your question becomes challenging is the issue of *preventing* users
screwing up your document. If you can assume that your users have no
malicious intent, there's no problem -- create a form in the usual way and
simply *ask* them not to muck around with it. Not even worth posting a
question about... just follow the examples in Help.

If you can't make that assumption you need to be *very* specific about what
you're trying to achieve.'Allowed' in the sense that getting it wrong will
literally kill people? -- (which is the case with some kinds of
documentation.)


We are already using forms. Unfortunately we cannot make the assumption that
the layout of the document will stay untouched, therefore we must protect it
from such changes. We are trying to allow only the use of four or five
different styles inside the text form fields. For some reason after
protecting the document, no styles are selectable by the user. This is
strange since the "1. Formatting restrictions" section of the protect
document gives the idea of being able to choose from certain styles. Are we
misunderstanding something, or is there another way of handling the issue?

-Antti


  #6   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

Formatting restrictions are for ordinary templates, not forms. You can apply
a specific style to a text form field, but all the entered text will be in
that style.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"AnttiK" antti.koksalo( at )vamp.fi wrote in message
...
"Jezebel" kirjoitti:
It's called a "form", well documented in help.

Where your question becomes challenging is the issue of *preventing*

users
screwing up your document. If you can assume that your users have no
malicious intent, there's no problem -- create a form in the usual way

and
simply *ask* them not to muck around with it. Not even worth posting a
question about... just follow the examples in Help.

If you can't make that assumption you need to be *very* specific about

what
you're trying to achieve.'Allowed' in the sense that getting it wrong

will
literally kill people? -- (which is the case with some kinds of
documentation.)


We are already using forms. Unfortunately we cannot make the assumption

that
the layout of the document will stay untouched, therefore we must protect

it
from such changes. We are trying to allow only the use of four or five
different styles inside the text form fields. For some reason after
protecting the document, no styles are selectable by the user. This is
strange since the "1. Formatting restrictions" section of the protect
document gives the idea of being able to choose from certain styles. Are

we
misunderstanding something, or is there another way of handling the issue?

-Antti


  #7   Report Post  
Jay Freedman
 
Posts: n/a
Default

On Mon, 10 Jan 2005 04:27:02 -0800, AnttiK antti.koksalo( at
)vamp.fi wrote:

"Jezebel" kirjoitti:
It's called a "form", well documented in help.

Where your question becomes challenging is the issue of *preventing* users
screwing up your document. If you can assume that your users have no
malicious intent, there's no problem -- create a form in the usual way and
simply *ask* them not to muck around with it. Not even worth posting a
question about... just follow the examples in Help.

If you can't make that assumption you need to be *very* specific about what
you're trying to achieve.'Allowed' in the sense that getting it wrong will
literally kill people? -- (which is the case with some kinds of
documentation.)


We are already using forms. Unfortunately we cannot make the assumption that
the layout of the document will stay untouched, therefore we must protect it
from such changes. We are trying to allow only the use of four or five
different styles inside the text form fields. For some reason after
protecting the document, no styles are selectable by the user. This is
strange since the "1. Formatting restrictions" section of the protect
document gives the idea of being able to choose from certain styles. Are we
misunderstanding something, or is there another way of handling the issue?

-Antti


Hi Antti,

I assume you're working with Word 2003, since the formatting
restrictions first appeared in that version. The following method
works in all versions back to Word 2000 (maybe 97, I'm not sure)
because it doesn't depend on the restriction -- it's just that your
template will supply the only methods of changing the style in text
fields, and you supply only the styles you want.

When the form is protected, Word disables all methods of changing the
style, through dialogs, shortcuts, and VBA. The solution is to use VBA
to unprotect the document, change the style, and then restore the
protection, all in one operation.

You can place macros like these in your template (you may need to
change the names of the styles, as these aren't constant from one
language version to another). Also create toolbar buttons and/or
keyboard shortcuts to make it easy to call the macros.

Sub FieldStyleNormal()
Dim SaveRange As Range
Set SaveRange = Selection.Range
ActiveDocument.Unprotect
Selection.Paragraphs(1).Range.Style = _
ActiveDocument.Styles("Normal")
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
NoReset:=True
SaveRange.Select
End Sub

Sub FieldStyleHead1()
Dim SaveRange As Range
Set SaveRange = Selection.Range
ActiveDocument.Unprotect
Selection.Paragraphs(1).Range.Style = _
ActiveDocument.Styles("Heading 1")
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
NoReset:=True
SaveRange.Select
End Sub

Sub FieldStyleHead2()
Dim SaveRange As Range
Set SaveRange = Selection.Range
ActiveDocument.Unprotect
Selection.Paragraphs(1).Range.Style = _
ActiveDocument.Styles("Heading 2")
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
NoReset:=True
SaveRange.Select
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
  #8   Report Post  
AnttiK
 
Posts: n/a
Default

Hi Antti,

I assume you're working with Word 2003, since the formatting
restrictions first appeared in that version. The following method
works in all versions back to Word 2000 (maybe 97, I'm not sure)
because it doesn't depend on the restriction -- it's just that your
template will supply the only methods of changing the style in text
fields, and you supply only the styles you want.

When the form is protected, Word disables all methods of changing the
style, through dialogs, shortcuts, and VBA. The solution is to use VBA
to unprotect the document, change the style, and then restore the
protection, all in one operation.

You can place macros like these in your template (you may need to
change the names of the styles, as these aren't constant from one
language version to another). Also create toolbar buttons and/or
keyboard shortcuts to make it easy to call the macros.

Sub FieldStyleNormal()
Dim SaveRange As Range
Set SaveRange = Selection.Range
ActiveDocument.Unprotect
Selection.Paragraphs(1).Range.Style = _
ActiveDocument.Styles("Normal")
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
NoReset:=True
SaveRange.Select
End Sub

Sub FieldStyleHead1()
Dim SaveRange As Range
Set SaveRange = Selection.Range
ActiveDocument.Unprotect
Selection.Paragraphs(1).Range.Style = _
ActiveDocument.Styles("Heading 1")
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
NoReset:=True
SaveRange.Select
End Sub

Sub FieldStyleHead2()
Dim SaveRange As Range
Set SaveRange = Selection.Range
ActiveDocument.Unprotect
Selection.Paragraphs(1).Range.Style = _
ActiveDocument.Styles("Heading 2")
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
NoReset:=True
SaveRange.Select
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org


Hi Jay and Suzanne.

Thank you a lot for your answers. I'd like to try that way where I don't use
VBA. I don't have experience of VBA. Yes I know it's basic language, but
still I don't have time to learn it.

If you have this kind of problem, how you solve that without VBA? Is there a
way to limit useable styles, without protecting document? Can I lock only
some parts of document perhaps? I think the solution is very simple, but I
just don't get it.

Please help me a bit more...

-Antti
  #9   Report Post  
Jay Freedman
 
Posts: n/a
Default

On Mon, 10 Jan 2005 11:35:02 -0800, AnttiK antti.koksalo( at
)vamp.fi wrote:

Hi Jay and Suzanne.

Thank you a lot for your answers. I'd like to try that way where I don't use
VBA. I don't have experience of VBA. Yes I know it's basic language, but
still I don't have time to learn it.

If you have this kind of problem, how you solve that without VBA? Is there a
way to limit useable styles, without protecting document? Can I lock only
some parts of document perhaps? I think the solution is very simple, but I
just don't get it.

Please help me a bit more...

-Antti


If I'm correct that you're using Word 2003 -- and if everyone who will
need to fill out your form also has 2003 -- you can use the new
protection feature it introduced.

Remove the form fields, and just leave spaces and/or paragraph marks
there as appropriate. In the Protect Document task pane, change the
Editing Restrictions from "Filling in forms" to "No change (Read
only)". Select each former form field area in turn and check the
Everyone box in the Exceptions part of the task pane. When you've done
all the areas, click the Start Enforcing button.

You can password-protect the settings if needed.

One main difference between this and form fields is that you can't use
the Tab key to navigate through the fields. Instead, the task pane has
buttons for "Find Next Region I Can Edit" and "Show All Regions I Can
Edit".

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Retain editable images and allow text boxes in a form PW protected Shannon Microsoft Word Help 2 December 8th 04 03:37 PM


All times are GMT +1. The time now is 03:43 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"