View Single Post
 
Old 02-03-2012, 05:23 AM
tinfanide tinfanide is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default Word VBA: add textboxs in table cells?

Code:
Sub test()

Dim tbl As Word.Table

With ActiveDocument

    Set tbl = .Tables.Add(Range:=Selection.Range, _
    NumRows:=2, _
    NumColumns:=2, _
    DefaultTableBehavior:=wdWord8TableBehavior)

    With tbl
        
        .Borders(wdBorderTop).LineStyle = wdLineStyleSingle
        .Borders(wdBorderRight).LineStyle = wdLineStyleSingle
        .Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
        .Borders(wdBorderLeft).LineStyle = wdLineStyleSingle
        .Borders(wdBorderHorizontal).LineStyle = wdLineStyleSingle
        .Borders(wdBorderVertical).LineStyle = wdLineStyleSingle
        

    End With


End With

End Sub
Is it possible to add textboxs inside table cells?
Reply With Quote