Re: How do I insert and modify a table in a Word document?
- From: "Phil" <plmcelwee@xxxxxxxxx>
- Date: 28 Jul 2005 13:28:09 -0700
marc laetzel wrote:
> Phil wrote:
> >
> >
> > If anyone can help with this or point me to a website containing
> > this
> > information, I would really appreciate it.
> >
> >
> > Phil wrote:
> >> Can someone please provide the ActiveX commands that I can use
> in
> >> Matlab to insert a table into a Word document. I am looking
> for
> >> commands to create the table, specify the number of rows and
> > columns,
> >> adjust column widths, and put text into the cells of the table.
> >>
> >> I have spent a lot of time searching in Google and in this
> > newsgroup
> >> and I can't seem to find this information anywhere. Please
> help!
> >
> >
>
> Hi,
>
> just some starting ideas:
>
> e = actxserver ('Word.Application');
> wDocument = e.Documents.Add
>
> %To insert a Table yuo need to specify the place where it should be
> entered, to do so use a Range Object:
>
> r=wDocument.Range(0,0) %Sets the Range to the beginning of the
> document
>
> wDocument.Tables.Add(r,3,4) % insert a 3 by 4 table
>
> %in order to modify the table you have to use the table object
> directly see e.g.
>
> wDocument.Tables.Item(1).Style.get
>
> As a source for using the commands
> <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbawd11/html/woobjTable1_HV05213695.asp>
>
> might proove useful
>
> Hope I could be of help
>
> regards
>
> Marc
Marc, thanks so much for your help. I am still having trouble with
this though because it seems the syntax differs between what is on the
Microsoft website and what you put into Matlab. If you could help me
out with two additional things I would be very grateful.
Can you please give me an example of how I would write some text to a
cell (e.g., row 3, column 2). Also I would like to know how to change
the width of a column.
What would be better is if I could learn how to find the needed
commands at the Microsoft website and translate those into working
Matlab commands, but I can't seem to figure this out. Thanks for any
help you can provide.
.
- Prev by Date: Re: How to integrate a function from -inf to a ?
- Next by Date: Equation Fit for 3D Surface
- Previous by thread: daqregister('parallel') problem
- Next by thread: Equation Fit for 3D Surface
- Index(es):
Relevant Pages
|
Loading