none
Binding Content Controls that are in Page Header and populating them RRS feed

  • Question

  • I'm making a Task Pane App for Word.

    I've added 3 Content Controls with different titles to page header with hope to populate them with strings I define in my javascript code.

    I can not bind them though.

    Are content controls in header/footer not bindable by Office API (v 1.1)?

    Thanks

    Bogac

    Thursday, September 17, 2015 5:07 PM

Answers

  • Hi Bogac,

    No, it is incorrect. We can bind the rich content control in header if there are no other rich content controls in the body of document. Here are the test I've made:
    1. Create two pages and put one rich content control in the header

    2. Binding the content control in the page header and set the value. All the rich content control in the header would be set

    However, the scenario will be complex if there are two and more sections in the document. And the behavior of binding the content control and set the value via the binding object depends on the settings of pager header and footer.

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Bogac Guven Friday, September 25, 2015 10:46 AM
    Tuesday, September 22, 2015 7:01 AM
    Moderator

All replies

  • Hi Bogac,

    >>Are content controls in header/footer not bindable by Office API (v 1.1)?<<

    No. We are only able to bind rich content control in Office add-in at present. If you want to Office add-in to support other kind of content controls, I suggest that  you try to submit the feedback from link below:
    Customer Feedback for the Office Developer Platform

    In addition, there is an potential issue that when we bind the content controls if they exits both in page header and body of document. You can get more detail about this issue in thread below:
    Multiple objects with the same name

    Please feel free to let me know, if you still have problem with binding content controls in Office add-in.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, September 18, 2015 3:21 AM
    Moderator
  • Thaks Fei.

    What I understand is, I can't also put a Rich-Text CC in header/footer for binding, because it will not be a single entity, it will be copied over each page automatically.

    Is that correct?

    Saturday, September 19, 2015 9:06 AM
  • Hi Bogac,

    No, it is incorrect. We can bind the rich content control in header if there are no other rich content controls in the body of document. Here are the test I've made:
    1. Create two pages and put one rich content control in the header

    2. Binding the content control in the page header and set the value. All the rich content control in the header would be set

    However, the scenario will be complex if there are two and more sections in the document. And the behavior of binding the content control and set the value via the binding object depends on the settings of pager header and footer.

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Bogac Guven Friday, September 25, 2015 10:46 AM
    Tuesday, September 22, 2015 7:01 AM
    Moderator
  • I have rich text content controls in the page as well.

    Although rich text content control names in header are different, they don't bind.

    Doesn't really make sense.

    Bogac

    Thursday, September 24, 2015 11:48 AM
  • ...and set the value via the binding object depends on the settings of pager header and footer.

    Hi Fei,

    What settings are you refering to? I've tried with content controls in header and in body (wih different names). After I bind ones in body, content controls in header are not bindable.

    Thanks

    Friday, September 25, 2015 10:49 AM
  • Hi Bogac,

    >>What settings are you refering to?<<

    We can change the options to affect the behavior of page header and footer via DESIGN-> Options like figure below:

    >> I've tried with content controls in header and in body (wih different names). After I bind ones in body, content controls in header are not bindable<<

    This issue is discussed in thread below:

    https://social.msdn.microsoft.com/Forums/office/en-US/cfc93505-d2b7-4a0d-900c-6957ed70e80c/multiple-objects-with-the-same-name?forum=appsforoffice#cfc93505-d2b7-4a0d-900c-6957ed70e80c

    To fix this issue, I also suggest that you contact the Office Developer Team via link below:Customer Feedback for the Office Developer Platform

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, September 28, 2015 2:37 AM
    Moderator
  • I've sent a suggestion for this case.

    Thanks

    Thursday, October 1, 2015 10:14 AM