none
How to show table gridlines in Word 2010 programmatically ? RRS feed

  • Question

  • When we add a table in Word 2010 programmatically the table is shown without gridlines. Is there a way to activate this

    programmatically ? ( I know you can do it manually in the menu point Table Tools/Layout/View GridLines )

    Thanks in advance.

     

     

     

    Thursday, February 2, 2012 10:12 AM

Answers

  • Hi Henrik

    TableGridlines is a property of the Window or Pane object. It need not be ActiveWindow, as in the following code snippet, but that's what is used most often:

    Document.ActiveWindow.View.TableGridlines = True


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by HenrikPedersen Thursday, February 2, 2012 2:30 PM
    Thursday, February 2, 2012 12:33 PM
    Moderator