turkey
08-14-2007, 09:07 AM
I'm using the following to copy a table in Excel and paste it into Word.
Set wordApp = CreateObject("Word.Application")
wordApp.Visible = True
Set wordDocument = wordApp.Documents.Add
wordDocument.Paragraphs(wordDocument.Paragraphs.Count).Range.InsertParagrap hAfter
wordDocument.Paragraphs(wordDocument.Paragraphs.Count).Range.Paste
But when the table is placed in word, it does not fit on the page and half of it is cut off. How can I make the table autofit in word? I also want to make header rows repeat.
Set wordApp = CreateObject("Word.Application")
wordApp.Visible = True
Set wordDocument = wordApp.Documents.Add
wordDocument.Paragraphs(wordDocument.Paragraphs.Count).Range.InsertParagrap hAfter
wordDocument.Paragraphs(wordDocument.Paragraphs.Count).Range.Paste
But when the table is placed in word, it does not fit on the page and half of it is cut off. How can I make the table autofit in word? I also want to make header rows repeat.