Inserting paragraph in the table using VB 
Author Message
 Inserting paragraph in the table using VB

Hi

I am creating word doc on the fly using VB.   Please let me know is it
possible to insert 2 paragraphs in a table column.

eg

                                            Table 1

                    Column1                       Column2
  Row 1        Para1                            Testing1
                    Para2

  Row 2        Para1                            Testing2
                    Para2

Thanks for your help.

Thyagu



Sun, 12 Dec 2004 04:11:49 GMT  
 Inserting paragraph in the table using VB
Hi Thyagu,

Quote:
> I am creating word doc on the fly using VB.   Please let me know is it
> possible to insert 2 paragraphs in a table column.

First, you want to have a way to access the specific table. I'd say you
should do so using an object variable. Roughly like this:
    Set tbl = ActiveDocument.Tables.Add ...

Then you can do things with the table cells like this:
    tbl.Cell(1,1).Range.Text = "First para text" & vbCR & "Second para
text"

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://www.mvps.org/word
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)



Sun, 12 Dec 2004 17:02:55 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to insert paragraph (\par RTF tag) using VBA

2. Inserting data into mutliple tables using SQL Insert Command

3. inserting a number tag in a particular paragraph

4. Align only last-inserted paragraph in footer

5. Inserting a paragraph at end of document?

6. Insert a new (numbered) paragraph with formfields

7. How to insert paragraph between picture & text

8. insert paragraph

9. Insert contents of text file into table using ado connection

10. Inserting new table into database using SQL

11. Update table from flexgrid using insert into

12. Insert row in table using VBA

 

 
Powered by phpBB® Forum Software