Excel Table Width Pasted into Word

A

Alan

I have a range of cells in an Excel 2003 worksheet that I paste (using
VBA) into Word 2003. However, the columns in the resulting table in
Word have been stretched out. I tried adjusting the PageWidth in
Word, but this does not seem to help.

Is there a particular way I can do this to keep the width of the Word
table columns the same as the original Excel cells?

Thanks in Advance, Alan

P.S. Not sure if this belongs in an Excel or Word VBA group.
 
J

Joel

Use PasteSpecial instead of Paste and for workd choose text.

Selection.Range.PasteSpecial DataType:=wdPasteText

Make sure you are using a word object and not an excel object.
 
A

Alan

Joel,
Perhaps I was not clear. . . . I am trying to paste Excel
cells into Word as a table. Alan
 
J

Joel

Pastespecial can be any of the formats below in word. The RTF and HTML will
create tables in word


wdPasteBitmap
wdPasteDeviceIndependentBitmap
wdPasteEnhancedMetafile
wdPasteHTML
wdPasteHyperlink
wdPasteMetafilePicture
wdPasteOLEObject
wdPasteRTF
wdPasteShape
wdPasteText

I believe the data will not automatically wrap in a table cell in word and
will be stretched out. You have to manuall adjust the column widths in the
word table after you paste the data into word "OR" create a table first in
word with the exact size of the amount of data you are taking from excel with
the column width already set to your prefer width. Word when creating a
table will keep the size of the table inside the page size. Then select the
entire table in word and perform the paste.


I usually just adjust the table column in word after I paste the data. It
is simple to adjust the columns by selecting in any cell in a column anbd
then going to the top of the table and sliding the column width bars.
 
A

Alan

The Excel spreadsheet has multiple sections with cells of different
width. When I copy these sections individually, everything comes out
fine.

Alan
 
J

Joel

This may be the time to ask the WORD experts. I'm not an expert on microsoft
word and don't know all the details how word determines the column widths of
a table. You need to specify the exact method you are using to copy setions
of the excel spreadsheet and the method you are using to copy more than one
section. Include the ranges of cells in the spreadsheet and the tables you
are using in word. For example are you puting the data into a new table or
existing table. if it is an existing table which cells are you selecting in
the table before you are pasting the data. The more information you include
the easier it is to duplicate the problem and solve the problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top