'Paste the array values into the activesheet starting at cell(1,1)Ĭells(r, c) = WorksheetFunction.Clean(AryTblData(r, c)) 'Loop through the 10x10 Source table and assign all values to 2 dimensional arrayĪryTblData(r, c) = ActiveDocument.Tables(1).Cell(r + 1, c) Sub Method02_Array()ĭim AryTblData(1 To 10, 1 To 10) As Variant Then loop through the Excel table and assign the values from the Array into the table. METHOD 02: Loop through the Word table, and assign all the contents to a Array (variant). PROBLEM WITH METHOD 01: Excel creates multiple rows and merged cells whenever there are multiple paragraphs in the Word Table. ![]() METHOD 01: Select the entire table in Word, select a single cell in Excel, and paste. Solutions I've already tried and specifically where I got stuck: More specifically, I need to include all that formatted text from a cell from the Word table inside a single cell in the corresponding Excel table. The challenge: Maintain the formatting of the data from Word, which includes bulleted lists and multiple paragraphs. ![]() The task is simple - Copy data from a table from Microsoft Word to Microsoft Excel. I've been coding VBA for many years but this one is a real head-scratcher.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |