LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old September 25th 07, 06:32 PM posted to microsoft.public.excel.programming
external usenet poster
First recorded activity by ExcelBanter: Sep 2006
Posts: 84
Default Formatting Word Tables


I am currently working with Excel and Word and the task I need to perform is
pasting a table from Excel to Word. The steps I follow a

- Select an Excel range (xlRng)
- Create an instance of Word (wdApp)
- Add a Word document (doc)
- Paste xlRng into doc using the PasteExcelTable command.
- Set the table as a Word table object (tbl)

Everything is OK until I try to change the width of tbl's columns. Visual
Basic sends me error messages, but they do not apply since the instructions
are Ok. The error messages I receive a

a) 5992: An attempt to modify the width of a column when tbl contains merged
cells. This error appears BEFORE I merge the cells.
b) -2147467259 (80004005): An attempt to change the space between the
paragraphs of tbl. Like in:
With tbl.Range.ParagraphFormat
.SpaceBefore = 0
.SpaceAfter = 0
End With

I am very confused since the number of tables has an influence on whether
Visual Basic raises an error or not. In particular, it sends me this error
messages whenever I paste 6 or more tables. If I use less than 6, the code
runs Ok. If I use more the code stops at table 6.

How do I know if this is a "bug" and how do I report it? I am using MSO
Professional 2003.

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
Convert Word tables to Excel Giri Excel Discussion (Misc queries) 0 January 23rd 08 01:00 AM
Copy tables from MS Word Steve[_73_] Excel Programming 0 August 14th 07 09:55 PM
copying word tables into excel vmwexway Excel Worksheet Functions 0 March 1st 06 04:33 PM
VBA from Excel 97-Word 97 tables Mark Howell Excel Programming 0 November 18th 03 04:45 PM
export to word without tables GUS Excel Programming 1 September 11th 03 11:28 PM

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

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

About Us

"It's about Microsoft Excel"


Copyright © 2017