Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
Macro for word tables to excel
There are lots of posts asking how to write a macro exporting a word
table to excel 2003. This is probably the most simple macro for this task: Sub GetWordTable() Dim wdap As Word.Application Dim wddc As Word.Document Dim wdtbl As Word.Table Set wdap = GetObject(, "word.application") Set wddc = wdap.ActiveDocument Set wdtbl = wddc.Tables(1) wdtbl.Range.Cut ActiveSheet.Paste End Sub |
#2
Posted to microsoft.public.word.tables
|
|||
|
|||
Macro for word tables to excel
Simple to the point of silly. How can you, at the Excel end, know that it's
the first table in the active document that you want? And why remove it remove the document rather than copying it? You'll also get poor results if any of the Word cells contains multiple paragraphs. It's also poor programming to mixing early and late binding. wrote in message oups.com... There are lots of posts asking how to write a macro exporting a word table to excel 2003. This is probably the most simple macro for this task: Sub GetWordTable() Dim wdap As Word.Application Dim wddc As Word.Document Dim wdtbl As Word.Table Set wdap = GetObject(, "word.application") Set wddc = wdap.ActiveDocument Set wdtbl = wddc.Tables(1) wdtbl.Range.Cut ActiveSheet.Paste End Sub |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro execution using MailMerge | Mailmerge | |||
Importing tables from Excel | New Users | |||
wordcount macro for tables and brackets | Tables | |||
Inserting Excel tables into Word | Microsoft Word Help | |||
How stable are tables paste-linked from Excel XP into Word XP | Microsoft Word Help |