Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. "Alan" wrote: 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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Joel,
Perhaps I was not clear. . . . I am trying to paste Excel cells into Word as a table. Alan |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. "Alan" wrote: Joel, Perhaps I was not clear. . . . I am trying to paste Excel cells into Word as a table. Alan |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The Excel spreadsheet has multiple sections with cells of different
width. When I copy these sections individually, everything comes out fine. Alan |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. "Alan" wrote: The Excel spreadsheet has multiple sections with cells of different width. When I copy these sections individually, everything comes out fine. Alan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Text from word to be pasted in excel | Excel Programming | |||
Chart pasted from excel to word is distorted | Charts and Charting in Excel | |||
How to fix a Excel corrupt object pasted into Word? | Excel Worksheet Functions | |||
Adjust an Excel table with the width of a Word page | Excel Discussion (Misc queries) | |||
Help with Excel table pasted in Word? | Excel Programming |