From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Report production when Using a GUI
Date: Mon, 1 Nov 2010 22:02:03 +0000 (UTC)
Organization: Sandia National Laboratories
Lines: 11
Message-ID: <iandcr$dvc$>
References: <iamts0$5ht$> <ian2rg$8uh$> <ian3nh$7l4$> <ian668$k7d$> <ian8ud$kbo$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1288648923 14316 (1 Nov 2010 22:02:03 GMT)
NNTP-Posting-Date: Mon, 1 Nov 2010 22:02:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 210783
Xref: comp.soft-sys.matlab:683018

There are two good places to start:

This is the Matlab documentation on how to interact with COM objects.  You can use Matlab's get() and set() functions, but you can also use syntax like Word_COM.Visible = 1 (more VBA-like syntax).  The only time I've run into problems is sometimes Office objects let you do things like object.Items("Name") to get the particular name of an object from a collection.  I've never found an analog in Matlab and always just end up looping through all items and finding a match.

2.  Documentation in the Word Developer Reference
All of the objects, methods, and parameters you use are defined by Word.  That's why the macro-editor is so handy.  If you need to do something from Matlab, just record a macro and then perform what is usually a trivial translation to Matlab.  Often no translation is needed at all.  You also need this reference to explain enumerations that the macro editor will use.

You might also looks at the methodsview() function in Matlab.  This is useful at times.  If you call methodsview(Word_COM) you'll see all the methods defined for that object.  In the Arguments list, the first argument is always "handle".  That's the object itself and does not need to be repeated explicitly in the argument list.  You can use get(Word_COM) to look at all of the parameters defined for the object as well.