LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Copying Excel table to Word, with Formatting

I have an application that builds a nice looking table in Excel. The
end-user wants this to be as Word table, instead.

The spreadsheet has 10 columns (all equal width), although the columns
are merged in some rows.

I have a VBA routine (in Excel) that copies the spreadsheet and pastes
it into Word.

It looks good, but is too wide to fit on the page and it resizes the
columns inappropriately, so I issue this command
appWD.Selection.Tables(1).AutoFitBehavior (wdAutoFitWindow)
to (at least) make it fit on the page. However, this resizes the
columns in a way different than I want them.

I'd like to be able to have my paste use the exact same relative
columns widths as the source.

I've tried
appWD.Selection.Tables(1).Columns.Width = 44.25
but this doesn't work because I have merged cells. I can't specify a
column index, because I then get a message that it can't refer to
specific column indexes because of the merged cells.

The end result has to be a normal Word table, so I can't make it a
graphic. I can't have Excel save as an RTF, because this strips a
good deal of my formatting.

Any ideas of how I can end up with an exact copy of my Excel
spreadsheet as a Word table? All formatting, save for the widths, is
perfect.

 
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
Keep Word formatting when copying text to Excel Beckyblanco Excel Discussion (Misc queries) 1 December 17th 08 03:34 PM
Copying a table from Word BenO Excel Discussion (Misc queries) 5 October 10th 08 10:10 PM
copying/pasting accurately from a Word table (carriage returns) Guest3731 Excel Discussion (Misc queries) 1 May 6th 08 11:44 PM
Merged Cells when copying a table from Word to Excel jay Excel Discussion (Misc queries) 1 March 12th 08 01:23 AM
Excel Word copying info from Excel to Word without gridlines / bor Renee Thomas Excel Discussion (Misc queries) 2 September 13th 07 09:24 AM


All times are GMT +1. The time now is 07:19 AM.

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"