Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Excel Table Width Pasted into Word

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Excel Table Width Pasted into Word

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Excel Table Width Pasted into Word

Joel,
Perhaps I was not clear. . . . I am trying to paste Excel
cells into Word as a table. Alan
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Excel Table Width Pasted into Word

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Excel Table Width Pasted into Word

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

Alan



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Excel Table Width Pasted into Word

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text from word to be pasted in excel CAPTGNVR[_2_] Excel Programming 2 September 28th 08 03:52 AM
Chart pasted from excel to word is distorted GP Charts and Charting in Excel 2 April 12th 07 08:28 PM
How to fix a Excel corrupt object pasted into Word? hazel Excel Worksheet Functions 1 July 28th 06 06:57 PM
Adjust an Excel table with the width of a Word page [email protected] Excel Discussion (Misc queries) 1 August 2nd 05 10:24 AM
Help with Excel table pasted in Word? Ed Excel Programming 2 March 30th 05 05:02 PM


All times are GMT +1. The time now is 11:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"