Transfer Project table into word table

K

Kamil Dursun

Hello,

I have a task table that I want to transfer to Word. I call it MyPJTable.

I start a Word application called a1. Then I open a word document called w1.
I insert a table called MyWdTable in w1 with the same number of columns as
MyPJTable.

There it stops. I cannot select cells in the PJ table so I can insert them
one by one int the word table.

I would like to do something like

for r=1 to MyPjTable.rows
for c=1 to MyPjTable.columns
MyWordTable.range.cells(r,c).insertafter MyPjTable.cells(r,c).text
next c
MyWdTable.rows.add
next r

I cannot find out the total number of rows in the MyPjTable. It consists of
a number of selected tasks.

Any help please?
Kamil
 
J

Jan De Messemaeker

Hi,

"A number of selected tasks" is addressed as
Activeselection.tasks
You address a single selected tasks as
Activeselection.tasks(number)
You then do NOT address a column but the property you need:
activeselection.tasks(number).Text7

HTH
 

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