Red de conocimiento informático - Material del sitio web - Cómo agregar una tabla en WORD usando VB

Cómo agregar una tabla en WORD usando VB

ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:= 50, NumColumns:= _

4, DefaultTableBehavior:= wdWord9TableBehavior, AutoFitBehavior:= _

wdAutoFitFixed

Con Selection.Tables(1)

Si .Style <> "Tipo de cuadrícula" Entonces

.Style:=Selection.Tables(2)