T
tedmi
A table pasted from the clipboard into an empty doc needs to have its
properties set (it was copied to the clipboard by Excel). However, statements
like this are failing:
Selection.Tables(1).Rows.AllowBreakAcrossPages = False
The error message is 4608, Value out of Range.
?Selection.Tables.Count shows 1 in the immediate window,
and ?Selection.Tables(1).Rows.AllowBreakAcrossPages displays -1
If I create a table by hand, and run the code, it works - but not on the
table imported from Excel.
Here's how I built it. Opened an existing .dot file, created a table by
hand, recorded a macro that sets the properties, deleted the table.
But when I open a doc from this dot, and paste the Excel-created table, no
joy.
Any clues? Thanks.
properties set (it was copied to the clipboard by Excel). However, statements
like this are failing:
Selection.Tables(1).Rows.AllowBreakAcrossPages = False
The error message is 4608, Value out of Range.
?Selection.Tables.Count shows 1 in the immediate window,
and ?Selection.Tables(1).Rows.AllowBreakAcrossPages displays -1
If I create a table by hand, and run the code, it works - but not on the
table imported from Excel.
Here's how I built it. Opened an existing .dot file, created a table by
hand, recorded a macro that sets the properties, deleted the table.
But when I open a doc from this dot, and paste the Excel-created table, no
joy.
Any clues? Thanks.