You can use a library called ExcelLibrary. If ActiveDocument.Tables(xx).Columns.Count = 2 Then Set exApp = CreateObject("Excel.Application")įor xx = 1 To ĪctiveDocument.Tables(xx).Cell(2, 2).Range.CopyĪctiveDocument.Tables(xx).Cell(3, 2).Range.CopyĪctiveDocument.Tables(xx).Cell(i - 2, 2).Range.CopyĪctiveDocument.Tables(xx).Cell(i - 1, 2).Range.CopyĪctiveDocument.Tables(xx).Cell(i, 2).Range.CopyĪfter some review, i ve found that i shoud use pastespecial in my paste the corrected code is bellow Sub copyfromwordtoexcel() This is my code: Sub copyfromwordtoexcel() Maybe I'm wrong in the paste method uh i don't know…. but i don't know why the result is an blank excel file. I have no problem on addressing the cells that i want to copy from my word file. I'm trying to generate an excel file with 5 column from specific tables' cells in a word file (copy from word table to excel).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |