Create a macro to insert a customized table

Z

Zippy07

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
 
C

Charles Kenyon

Unless you are changing your customizations dynamically, why not just create
the table and save it as an AutoText entry. If need be, you can use a macro
to retrieve the AutoText.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide




--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top