creating two or more tables

C

codaman

hi everybody;

I'd like creating a report in a word document from vb.
I need two or more tables in the report but i can only do one of them.
The next table is created inside a cell of the first one.
How can i move de cursor or the range of the document?
How can i create diferent tables in a diferent paragraph?
And the last one... by now...Could i insert a jpg file in a cell?

thanks in advance.
 
D

Doug Robbins - Word MVP

The following code will add two separate tables to a document

Dim myrange As range
Set myrange = ActiveDocument.range
myrange.Collapse wdCollapseEnd
ActiveDocument.Tables.Add myrange, 2, 3
Set myrange = ActiveDocument.range
myrange.Collapse wdCollapseEnd
myrange.InsertAfter vbCr
myrange.End = myrange.End + 1
myrange.Collapse wdCollapseEnd
ActiveDocument.Tables.Add myrange, 2, 3


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
C

codaman

Ok Doug, thanks very much.
it really help me. I guess will have more questions in the future
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top