the code suggested in the answer to this question (Exporting a sheet to a word table gives a weird outcome) does not make the table fit in the margins, resulting in part of the table being hidden
How can I force the table to fit in the margins?
I have tried objDoc.Tables.AutoFitBehavior (wdAutofitWindow)
but it doesn't work.
This code is based on your last question.
For above code to run you'll have to add reference of Microsoft Word 12.0 Object Library. You can do this in
VBE
. InTools
menu clickReferences
and selectMicrosoft Word 12.0 Object Library