Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Navigating in a word Document.
Message
De
13/09/2002 16:51:03
 
 
À
13/09/2002 14:26:17
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00700255
Message ID:
00700355
Vues:
10
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform