none
Insert text in a content control in a header RRS feed

  • Question

  • I have a letterhead in the FIRST PAGE HEADER with content controls.  I want to populate the letterhead from an Access database.  I have populated an array with all the variables.  When I try to insert the variables into the content controls I get "You are not allowed to edit this selection because it is protected."  I am using the following code:

        Set rng = ActiveDocument.StoryRanges(wdFirstPageHeaderStory)

        For Each cc In rng.ContentControls
             If cc.Title = "AuthorOfficeStreet" Then
                cc.Range.Text = varOfficeInfo(0)
            End If
        Next cc



    • Edited by orlandp Thursday, April 5, 2012 4:23 AM
    Thursday, April 5, 2012 4:16 AM

Answers