Currently this macro only paste the second table into the sheet, so it basically overwrites the first table and paste the second table. I need it to paste ALL tables as you see in code, how do i fix this?
Code:
Sub[COLOR=#303336] [/COLOR][COLOR=#2B91AF]ExportToWord[/COLOR][COLOR=#303336]()[/COLOR]<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;">[COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Worksheets[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]"Val Balance Sheet"[/COLOR][COLOR=#303336]).[/COLOR][COLOR=#2B91AF]Range[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]"A1:D22"[/COLOR][COLOR=#303336]).[/COLOR][COLOR=#2B91AF]Copy[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Dim[/COLOR][COLOR=#303336] wdapp[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] wddoc [/COLOR][COLOR=#2B91AF]As[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Object[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Dim[/COLOR][COLOR=#303336] strdocname [/COLOR][COLOR=#2B91AF]As[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]String[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]On[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Error[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Resume[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Next[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Set[/COLOR][COLOR=#303336] wdapp [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]GetObject[/COLOR][COLOR=#303336](,[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]"Word.Application"[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]If[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Err[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Number[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]429[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Then[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Err[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Clear[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Set[/COLOR][COLOR=#303336] wdapp [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]CreateObject[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]"Word.Application"[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]End[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]If[/COLOR][COLOR=#303336]
wdapp[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Visible[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#101094]True[/COLOR][COLOR=#303336]
strdocname [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]"C:\Users\ako\report.docx"[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]If[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Dir[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]strdocname[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]""[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Then[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]MsgBox[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]"The file "[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] strdocname [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] vbCrLf [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]"was not found "[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] vbCrLf [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]"C:\Users\ako\."[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] vbExclamation[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]"The document does not exist."[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Exit[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Sub[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]End[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]If[/COLOR][COLOR=#303336]
wdapp[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Activate[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Set[/COLOR][COLOR=#303336] wddoc [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] wdapp[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]documents[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Open[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]strdocname[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]If[/COLOR][COLOR=#303336] wddoc [/COLOR][COLOR=#2B91AF]Is[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Nothing[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Then[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Set[/COLOR][COLOR=#303336] wddoc [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] wdapp[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]DocumentOpen[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]strdocnme[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]
wddoc[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Activate[/COLOR][COLOR=#303336]
wddoc[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Range[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Paste[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Worksheets[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]"Template Gains and Losses"[/COLOR][COLOR=#303336]).[/COLOR][COLOR=#2B91AF]Range[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]"A1:C11"[/COLOR][COLOR=#303336]).[/COLOR][COLOR=#2B91AF]Copy[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Dim[/COLOR][COLOR=#303336] wdapp2[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] wddoc2 [/COLOR][COLOR=#2B91AF]As[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Object[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Dim[/COLOR][COLOR=#303336] strdocname2 [/COLOR][COLOR=#2B91AF]As[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]String[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]On[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Error[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Resume[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Next[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Set[/COLOR][COLOR=#303336] wdapp2 [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]GetObject[/COLOR][COLOR=#303336](,[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]"Word.Application"[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]If[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Err[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Number[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]429[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Then[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Err[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Clear[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Set[/COLOR][COLOR=#303336] wdapp2 [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]CreateObject[/COLOR][COLOR=#303336]([/COLOR][COLOR=#7D2727]"Word.Application"[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]End[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]If[/COLOR][COLOR=#303336]
wdapp2[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Visible[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#101094]True[/COLOR][COLOR=#303336]
strdocname2 [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]"C:\Users\ako\report.docx"[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]If[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Dir[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]strdocname2[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]""[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Then[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]MsgBox[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]"The file "[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] strdocname2 [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] vbCrLf [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]"was not found "[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] vbCrLf [/COLOR][COLOR=#303336]&[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]"C:\Users\ako\."[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] vbExclamation[/COLOR][COLOR=#303336],[/COLOR][COLOR=#303336] [/COLOR][COLOR=#7D2727]"The document does not exist."[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Exit[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Sub[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]End[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]If[/COLOR][COLOR=#303336]
wdapp2[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Activate[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Set[/COLOR][COLOR=#303336] wddoc2 [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] wdapp[/COLOR][COLOR=#303336].[/COLOR][COLOR=#303336]documents[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Open[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]strdocname[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]If[/COLOR][COLOR=#303336] wddoc2 [/COLOR][COLOR=#2B91AF]Is[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Nothing[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Then[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Set[/COLOR][COLOR=#303336] wddoc2 [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] wdapp2[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]DocumentOpen[/COLOR][COLOR=#303336]([/COLOR][COLOR=#303336]strdocnme2[/COLOR][COLOR=#303336])[/COLOR][COLOR=#303336]
wddoc2[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Activate[/COLOR][COLOR=#303336]
wddoc2[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Range[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Paste[/COLOR][COLOR=#303336]
wddoc[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Save[/COLOR][COLOR=#303336]
wdapp[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]Quit[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Set[/COLOR][COLOR=#303336] wddoc [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Nothing[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Set[/COLOR][COLOR=#303336] wdapp [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Nothing[/COLOR][COLOR=#303336]
[/COLOR][COLOR=#2B91AF]Application[/COLOR][COLOR=#303336].[/COLOR][COLOR=#2B91AF]CutCopyMode[/COLOR][COLOR=#303336] [/COLOR][COLOR=#303336]=[/COLOR][COLOR=#303336] [/COLOR][COLOR=#101094]False[/COLOR][COLOR=#303336]
[/COLOR]</code>[COLOR=#303336] [/COLOR][COLOR=#2B91AF]End[/COLOR][COLOR=#303336] [/COLOR][COLOR=#2B91AF]Sub[/COLOR]