Share via

Creating an Agreement Template

Anonymous
2021-09-02T15:26:54+00:00

I'm trying to create an agreement template document for project managers to use with clients. It needs to be restricted so the managers can't change the wording, but they also need an option to select whether or not to include certain sections or which fee structure to include. Is there a way to have a restricted document that also allows users to select entire swaths of text to display? Additionally, with the fee structure they'd need the ability to type in numbers after one of the options was selected.

Thank you!

Microsoft 365 and Office | Word | For business | Windows

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.

0 comments No comments

Answer accepted by question author

Anonymous
2021-09-03T05:10:14+00:00

It can certainly be done, but for this type of work I would not include in the document any text that could be 'hidden'. It would be much better to insert only the required texts. I would be inclined to create a userform in which the user could select the optional texts to be included either from a list (or lists) or via check boxes. Then the appropriate texts could be written to pre-placed content controls. The texts could be hard coded in the document template, or from building blocks in the document template

You could write a zero width space - ChrW(8203) - to any control that is not used in the process.. The following code could be used to populate a content control from a text string or an autotext entry, with an option to lock the contents against editing (without again using the macro). The rest can be locked using read only protection with a password.

See https://www.gmayor.com/insert_content_control_addin.htm 

Public Sub FillCC(strCCTitle As String, strValue As String, bLock As Boolean)

'Graham Mayor - https://www.gmayor.com - Last updated - 03 Sep 2021

Dim oCC As ContentControl

    On Error GoTo lbl_Exit

    For Each oCC In ActiveDocument.ContentControls

        If oCC.Title = strCCTitle Then

            oCC.LockContents = False

            oCC.Range.Text = strValue

            oCC.LockContentControl = True

            If bLock = True Then oCC.LockContents = True

            Exit For

        End If

    Next oCC

lbl_Exit:

    Set oCC = Nothing

    Exit Sub

End Sub

Sub AutoTextToCC(strCCTitle As String, oTemplate As Template, strAutotext As String, bLock As Boolean)

'Graham Mayor - https://www.gmayor.com - Last updated - 10 Apr 2019

'strCCName is the ContentControl title

'oTemplate is the template with the autotext entry

'strAutotext is the name of the autotext entry

'bLock - set to True to lock the control content

Dim oCC As ContentControl

    On Error GoTo lbl_Exit

    For Each oCC In ActiveDocument.ContentControls

        If oCC.Title = strCCTitle Then

            oCC.LockContents = False

            oCC.LockContentControl = True

            If bLock = True Then oCC.LockContents = True

            oTemplate.AutoTextEntries(strAutotext).Insert Where:=oCC.Range, RichText:=True

            Exit For

        End If

    Next oCC

lbl_Exit:

    Set oCC = Nothing

    Exit Sub

End Sub

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2021-09-07T21:43:53+00:00

    Unfortunately, my company doesn't use macros for security reasons, so we're trying to work it out in another way and I won't be able to verify this recommendation. Thank you so much for your help though!

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2021-09-05T15:52:11+00:00

    Hi Sara,

    I'm writing this reply to follow up on this thread, may I know if you have checked Graham's reply? When you have time, you are welcome to come back and let us know if you still need help here.

    Regards,

    George

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2021-09-02T19:34:11+00:00

    Thank you for your reply! Specifically, I was trying to work out a way the user could choose to display certain text or not, because we don't want to allow editing on the actual text. I initially set up part of it using {IF {REF}} to display text based on the answer to a drop down list, but then the form fields within the text were inaccessible, so numbers couldn't be entered for the fee. I don't know if this is something Word can do, but I figured I'd ask.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2021-09-02T19:21:15+00:00

    Hi Sara,

    Thanks for posting in the community.

    According to your description, you want to create a document in which part of the content allows users to edit, and part of the content restricts editing. If my understanding is right, you can insert content controls, select it, click Properties, under Locking group, tick the option to make it can be edited or not OR you can use the Restrict Editing feature and select the part of the document where you want to allow changes.

    For your references:

    About content controls

    Allow changes to parts of a protected document

    If you have any updates or my understanding conflicts with your meaning, please feel free and let us know.

    Regards,

    George

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments