locked
Angle Bracket Problem, STYLEREF in Header of a Protected Document RRS feed

  • Question

  • I have a company letter template that I am creating (MS Word 2007). I am protecting the document and it has alternating continuous section breaks (thus not allowing some sections to be edited except for the form fields within that protected section). The first section of the document, which is a protected section, contains several rich text content contols. I have applied styles to three of these rich text content controls in order to reference them in the header on page 2 (using STYLEREF). Everything works perfrectly except for one small exception, I get a single angle bracket "<" at the beginning of each item in the header (i.e., the STYLEREF command returns the proper text but it always has a "<" at the beginning of the text). It's really annoying ! Can anyone help me ? Please ?

     

    Friday, June 18, 2010 4:23 PM

Answers

  • Content controls are not really designed to be used in protected documents. What sort of information is being entered into the content controls?  Maybe a better option would be to use a userform.

    -- Hope this helps.

    Doug Robbins - Word MVP,
    dkr[atsymbol]mvps[dot]org
    Posted via the Community Bridge

    "DonSutton" wrote in message news:c2a634d3-4c45-45d8-99c8-1312e8059d6e@communitybridge.codeplex.com...

    Thanks for the reply.... I have seen this suggestion before... the problem is that the field is within a protected section of the document.... so when I do this... I can type 1 character within the field and it automatically pushes me to the next field in the protected section.... if I unprotect this portion of the document.. it works fantastically... but defeats the purpose of having a field in the protected seciton of the document ... I can e-mail you a copy if you want to see specifics...

    Thanks

    Robert


    Doug Robbins - Word MVP dkr[atsymbol]mvps[dot]org
    Friday, June 25, 2010 9:44 PM
  • That is correct, content controls do not need a document to be protected to function.  If you need document protection, using legacy form fields may be a better solution.

    Have you tried putting them into read-only sections in the document?  I've seen this work on a similar issue.  It may be multiple read-only sections ultimately, but it may work that way.

    Here is more information about the incompatibility of content controls and form fields if you are using these as well:

    982267 Tabbing between form fields and content controls does not work correctly in Word 2010 or in Office Word 2007
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;982267

    Tuesday, June 29, 2010 11:20 PM

All replies

  • Hi,

    Try to select the "Remove content control when contents are edited" check box on the Content Control Properties form.

    1. Click the Microsoft Office Button Button image, and then click Word Options.
    1. Click Popular.
    2. Select the Show Developer tab in the Ribbon check box, and then click OK.
    3. On the Developer tab, click Properties in the Controls group, and then select the Remove content control when contents are edited check box.
    Wednesday, June 23, 2010 7:21 AM
  • Hi,

    I am writing to see how everything is going with this issue. Is the problem resolved? If there is anything I can do for you, please feel free to let me know.

     
    Jennifer Zhan

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact v-zhanyu@microsoft.com 

    Friday, June 25, 2010 1:21 AM
  • Thanks for the reply.... I have seen this suggestion before... the problem is that the field is within a protected section of the document.... so when I do this... I can type 1 character within the field and it automatically pushes me to the next field in the protected section.... if I unprotect this portion of the document.. it works fantastically... but defeats the purpose of having a field in the protected seciton of the document ... I can e-mail you a copy if you want to see specifics...

    Thanks

    Robert

    Friday, June 25, 2010 3:57 PM
  • Content controls are not really designed to be used in protected documents. What sort of information is being entered into the content controls?  Maybe a better option would be to use a userform.

    -- Hope this helps.

    Doug Robbins - Word MVP,
    dkr[atsymbol]mvps[dot]org
    Posted via the Community Bridge

    "DonSutton" wrote in message news:c2a634d3-4c45-45d8-99c8-1312e8059d6e@communitybridge.codeplex.com...

    Thanks for the reply.... I have seen this suggestion before... the problem is that the field is within a protected section of the document.... so when I do this... I can type 1 character within the field and it automatically pushes me to the next field in the protected section.... if I unprotect this portion of the document.. it works fantastically... but defeats the purpose of having a field in the protected seciton of the document ... I can e-mail you a copy if you want to see specifics...

    Thanks

    Robert


    Doug Robbins - Word MVP dkr[atsymbol]mvps[dot]org
    Friday, June 25, 2010 9:44 PM
  • That is correct, content controls do not need a document to be protected to function.  If you need document protection, using legacy form fields may be a better solution.

    Have you tried putting them into read-only sections in the document?  I've seen this work on a similar issue.  It may be multiple read-only sections ultimately, but it may work that way.

    Here is more information about the incompatibility of content controls and form fields if you are using these as well:

    982267 Tabbing between form fields and content controls does not work correctly in Word 2010 or in Office Word 2007
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;982267

    Tuesday, June 29, 2010 11:20 PM
  • Hello Robert,

    I wanted to check in with you to see if what Doug and I wrote helped at all.  If we can help, please let me know.

    Monday, July 5, 2010 10:33 PM
  • Hi, I have been been looking for a solution myself to the same problem for the last few days. The problem isn't really about wheter the form is protected or not

    So to come back to your first question, the easiest way to go is to hide the annoying brackets :

    Select the brackets, then in the Home tab >> Font detailed options >> then tick Hidden in the Effects options.

    (Keyboard shortcut : CTRL+D followed by ALT+H, then RETURN) 

     

    The other way is to follow Jennifer suggestion : but in that case and if you still want the user to be able to edit the text after the content control is removed and still keeping protected sections you will have to switch the editing restriction (Review tab >> Protect document) from "Filling in forms" to "No changes" and then adding Exceptions for each piece of user editable content you want in your form. 

    Note this second method will work only for text content controls. For date, list and combo content controls it is not possible to select Remove content control when contents are edited.

    Thursday, July 22, 2010 9:03 AM
  • To try removing angle brackets in the result of a StyleRef field that references a style that contains a content control(s), e.g. { STYLEREF  Title  \* MERGEFORMAT }, while in design mode select each content control bracket in the Title (left and right, but not the content itself) and make it hidden text. Seems to work in my version of Word 2007.

    phillfri

    Monday, November 19, 2012 8:11 PM