View Single Post
  #1   Report Post  
Posted to microsoft.public.word.tables
Zippy07
 
Posts: n/a
Default Create a macro to insert a customized table

Hello:

I'm trying to create a macro to insert a customized table in a document. I
know next to nothing about VB, but do have some programming background. I
want to create this table so that others in my group can quickly insert it to
have the same style formats and shading applied to tables throughout the
document.

I've read some VB articles, and found the following code to insert a table.
Unfortunatley, it's using an AutoFormat table and I'm clueless about how to
customize the code to suit my needs.

Sub Test()
Selection.Collapse Direction:=wdCollaspeStart
Set myTable = ActiveDocument.Tables.Add(Range:=Selection.Range, NumRows:=5,
NumColumns:=5)
myTable.AutoFormat Format:=wdTableFormatClassic2

End Sub


I would appreciate any help, link, reference, etc.

Thanks