none
Office.js: Add Title and Description to table RRS feed

  • Question

  • When I created a Word table with Microsoft.Office.Interop.Word I could set the alternative text by setting the values of the Title and/or Descr properties.

    var tbl = document.Tables.Add(range, 2, 2);
    tbl.Title = "This is the title";
    tbl.Descr = "This is the description";

    This would result in table properties like this

    Screenshot table properties

    When I create a table using the Office JavaScript API there is no title or descr property.

    var tbl = range.insertTable(2, 2, "After");
    tbl.title <-- is missing
    tbl.descr <-- is missing
    How can I do this via the Office JavaScript API?


    Tuesday, August 22, 2017 12:10 PM

Answers

  • Hi NCC-2909-M,

    currently Office JS Api provides the limited functionality and it is not possible to add table title and table description.

    I find that you had created a thread on stackoverflow forum.

    Office JavaScript API: set alt text of Word.Table

    which is already answered.

    I suggest you to mark the answer for this thread so we can close this thread.

    until you mark the answer, thread will remain open.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by NCC-2909-M Wednesday, August 23, 2017 9:40 AM
    Wednesday, August 23, 2017 9:25 AM
    Moderator

All replies

  • Hi NCC-2909-M,

    currently Office JS Api provides the limited functionality and it is not possible to add table title and table description.

    I find that you had created a thread on stackoverflow forum.

    Office JavaScript API: set alt text of Word.Table

    which is already answered.

    I suggest you to mark the answer for this thread so we can close this thread.

    until you mark the answer, thread will remain open.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by NCC-2909-M Wednesday, August 23, 2017 9:40 AM
    Wednesday, August 23, 2017 9:25 AM
    Moderator
  • Hello Deepak,

    when will the office.js has the same functionallity as Microsoft.Office.Interop?

    Kind regards,
    Mike

    Thursday, August 24, 2017 5:21 AM
  • Hi NCC-2909-M,

    currently we don't have any information when Office JS Api will offer this functionality.

    you can try to visit Office JS library online regularly.

    so that if any new update comes then you can get information about that and check the documentation about new functionality.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, August 25, 2017 3:27 AM
    Moderator