Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
writing to a table in wrod from excel
I recorded the following macro in word
Sub Macaddtable() ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=6, NumColumns:= _ 4, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _ wdAutoFitWindow With Selection.Tables(1) If .Style < "Table Grid" Then .Style = "Table Grid" End If .ApplyStyleHeadingRows = True .ApplyStyleLastRow = True .ApplyStyleFirstColumn = True .ApplyStyleLastColumn = True End With Selection.TypeText Text:="Qty" Selection.MoveRight Unit:=wdCharacter, Count:=1 End Sub I put it in excel and it errors on ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=6, NumColumns:= _ 4, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _ wdAutoFitWindow saying not the right numbe of arguments. I have references to word 11.0 . Any help please? -- Jason V |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pasrte defaults to wrod wrap. Howto Cahnge | Excel Discussion (Misc queries) | |||
How to use VBA read entries from a Wrod file into Excel | Excel Programming | |||
retain table formatting when writing excel table to a txt file | Excel Programming | |||
how do I create Business Cards with Office Wrod 2003? | Excel Discussion (Misc queries) | |||
Programmatically detect wrod-wrap? | Excel Programming |