Hi Claude,
Does anyone know how to programmatically insert an excel spreadsheet
into a Word document.
There are basically two approaches for the automation interface. One
is the InsertObject method. Personally, I find this to be a bit
unreliable.
The other, which I prefer, is to generate a LINK field (like Word does
when you use Edit/Paste Special, with "Link" activated; use Alt+F9 to
toggle the field codes on/off) using the Fields.Add method. With the
help of the various switches, I can tell Word whether to display the
table as an Excel object, as a Word table (using either RTF or HTML
conversion), or as unformatted text. If I don't want to retain the
link, I can break it after the field has been inserted and updated.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail