Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Navigating in a word Document.
Message
From
13/09/2002 16:51:03
 
 
To
13/09/2002 14:26:17
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00700255
Message ID:
00700355
Views:
9
>Ok another question. If I create a table in a word document with automation. How do I move from the right most column to the next row.
>
>.Selection.MoveDown(1) does not work
>

In general, unless you're trying to set things up for an end-user, there's no reason to work with the Selection object in Word. Work with the Range object, and the other objects available to you. For example, when you create a table, you can get an object reference to it, then you can use the objects within to get to the various cells. To work with the contents of a cell, create a Range from cell.

oTable = oDoc.Tables.Add( oRange, 5, 3)
* Access 1st cell in 3rd row
oCell = oTable.Rows[3].Cells[1].Range()

Now you can talk to the cell directly.

If you're trying to deal with a table that's already there, use the Tables collection to get the right one:

oTable = oDoc.Tables[5]

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform