Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Keep Word formatting when copying text to Excel | Excel Discussion (Misc queries) | |||
Copying a table from Word | Excel Discussion (Misc queries) | |||
copying/pasting accurately from a Word table (carriage returns) | Excel Discussion (Misc queries) | |||
Merged Cells when copying a table from Word to Excel | Excel Discussion (Misc queries) | |||
Excel Word copying info from Excel to Word without gridlines / bor | Excel Discussion (Misc queries) |